Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Shell



vim test.sh

#!/bin/sh
clear
echo "hi"

chmod 755 test.sh
./test.sh


-------------------
2 variable types
1)System Variables (SV)
BASH
භාවිතා කරන shell එකේ නම.
BASH_VERSION භාවිතා කරන shell එකේ version එක.
COLUMNS Screen එකේ පෙන්නන column ගණන.
HOME පද්ධතියේ Home ඩිරෙක්ටරයේ path එක.
LINES Screen එකේ පෙන්නන line ගණන.
LOGNAME පද්ධතියේ logging name එක.
OSTYPE පද්ධතියේ os type එක.
PATH පද්ධතියේ path සැකසුම.
PS1 පද්ධතියේ prompt සැකසුම.
PWD දැනට වැඩ කරන ඩිරෙක්ටරයේ path එක.
SHELL භාවිතා කරන shell එකේ නම.
 USERNAME
දැන් පද්ධතියට log වී සිටින පරිශීලකයාගේ නම.

$echo $USERNAME

2)User Defined Variables (UDV)

space හෝ *, ? noooo
_ is ok
no =10 (space is wrong)
case-sensitive

--------------------------

$ name='hasa'
$ echo $name

Arithmatics
$ expr 3 + 2 (need spaces)

$ x=10
$ y=5
$ expr $x + $y (need space)

$ echo `expr $x + $y` --->50


====================
consul as  windows service
====================
c:\Consul>consul.exe agent -config-dir="C:\Consul\consuld"  -client="0.0.0.0" -bind="172.55.1.173"

C:\Users\Administrator>sc create "Consul" binPath= "c:\Consul\consul.exe agent -config-dir=c:\Consul\consuld  -client=0.0.0.0 -
bind=172.55.1.173"

c:\>nssm.exe install Consulc c:\Consul\consul.exe agent -config-dir=c:\Consul\consuld  -client=0.0.0.0 -bind=172.55.1.173
Service "Consulc" installed successfully!

https://www.ricardclau.com/2016/03/running-go-executables-consul-telegraf-as-windows-services/

https://www.youtube.com/watch?v=QJxk0V5i6qM

========================
execute ping among multiple hosts
========================
for i in $(cat IPADDR.txt); do
ping ${i}
done


No comments:

Post a Comment