Skip to content

Instantly share code, notes, and snippets.

View seeni-dev's full-sized avatar

Seeni seeni-dev

View GitHub Profile
if [ 3 -eq 3 -a 3 -ge 2 ]
then
echo "work begins";
fi
if [ ! 3 -ge 4 ]
then
echo "! 3>4";
fi
i=5;
echo $((1+2));
echo $(($i-3));
echo $((7/2));
echo $((7%5));
for i in 1 2 3 4 5 6
do
echo $i;
done
i=0
while [ $i -lt 10 ]
do
echo $i;
i=$((i+1)); #increment the varaible i
done
@seeni-dev
seeni-dev / shell-if.sh
Created September 21, 2018 08:25
shell if condition
if [ $a -eq $b ] # -eq tests whether left operand is equal to the right operand
then
echo "a is equal to b"
else
echo "a and b are not equal"
fi
@seeni-dev
seeni-dev / shell-variables.sh
Last active September 21, 2018 08:11
shell declaring varaibles
numberVariable=3;
realVariable=3.14;
stringVariable_1=pi;
stringVariable_2="pi";