Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
cidr="192.168.0.1/24"
# range is bounded by network (-n) & broadcast (-b) addresses.
lo=$(ipcalc -n $cidr |cut -f2 -d=)
hi=$(ipcalc -b $cidr |cut -f2 -d=)
read a b c d <<< $(echo $lo |tr . ' ')
# echo $a.$b.$c.$d
read e f g h <<< $(echo $hi |tr . ' ')
# echo $e.$f.$g.$h
for ip in {$a..$e}.{$b..$f}.{$c..$g}.{$d..$h};
do
echo $ip
done;
# Hello World Program in Bash Shell
mkdir Englishfootball
cd Englishfootball
mkdir EPL
mkdir Division1
teams=(Cardiff Fulham Newcastle Westham Tottenham ManchesterUnited ManchesterCity Watford Sothampton Bournemouth Brighton CrystalPalacer Chelsea Arsenal Huddersfield Everton Burnley Newcastle Liverpool Wanderers)
for team in ${teams[*]}
do
printf 'This is a little description about %s\n' > $team
done
#!/bin/sh
# this is a comment
# let's give some values to variables
SOMETHINGELSE=TTT
DOGS=10
CATS=YELLOW
# if you uncomment the next line the "if" test will will be false
#CATS=ELLO
DOGS=1
echo "Let's do a loop"
for i in 1 2 3 4 5 100 200 112938 019283093 $SOMETHINGELSE $DOGS $CATS
do
echo "Looping ... number $i"
done
if [ "$CATS" = "YELLOW" ]; then
whatwesay="By the way, cats are yellow."
else
whatwesay="what just happend?"
fi
# what do we say?
echo $whatwesay
# echo the "cal" command, defaults to current month
echo
cal
# -3 just prints out three months
echo `cal -3`
# make a blank line
echo
# let's loop through cal!
for x in `cal -3`
do
echo $x
done
#!/bin/sh
SOMETHINGELSE=TTT
DOGS=10
CATS=YELLOW
echo "Let's do a loop"
for i in 1 2 3 4 5 100 200 112938 019283093 $SOMETHINGELSE $DOGS $CATS
do
echo "Looping ... number $i"
done
if [ "$CATS" = "YELLOW" ]; then
whatwesay="By the way, cats are yellow."
else
whatwesay="what just happend?"
fi
echo $whatwesay