cd ~/it244/ex
mkdir ex21
cd ex21
touch test{1,2,3,4,5}.txt
ls test?.txt
touch {foo,bar,bletch}.txt
ls *.txt
echo ~
echo ~ghoffman
echo ~xxxBash cannot make any sense out of this expression, so it doesn't try.
echo ~+
echo ~-
a=3; b=6
echo "a = $a, b = $b"
echo $(( $a + $b ))
echo $(( a - b ))Notice that you did not need to put dollar signs ($) in front of the variable names.
echo $((a*b))Notice that you do not need to use spaces to separate any of the elements of the expression.
echo $((b/a))
ls -l $(which python3)
now=$(date)
echo $now
echo *.txt
echo test?.txt
echo test[12].txt
cd ~/it244/ex/ex21
nano ex21.sh
chmod 755 ex21.sh
bash ex21.sh > /dev/nullRunning ex21.sh this way will only print error messages.
~ghoffman/it244_test/ex21.shWhen the script asks if you are ready for more, hit Return or Enter.