Unix - Hour 15

Basic Shell Programming 

15.1.1)
internet% set color=blue
internet% echo $color
blue
internet% set color=red
internet% echo $color
red
internet%           
15.1.2)
internet% set leaning='anti-'
internet% echo Joe is basically $leaningtaxes
learningtaxes: Undefined variable
internet% echo Joe is basically {$leaning}taxes
Joe is basically anti-taxes
internet% echo Joe is basically ${lll:-pro }taxes
Variable syntax
15.1.3)
internet% echo Joe is basically ${learning=pro }taxes and ${learning}spending.
Variable syntax
15.1.5)
internet% cat copy-files
#!/bin/csh -f

###################################################################
# Learning how to read parameters
# Siomara Pantarotto
##################################################################

cp $1 newFile1
cp $2 newFile2
cp $3 newFile3
internet% 
internet% ls
OWL                cis325             m13com             say.hitooREADME.2           cis327             m13com             sioFile2
README2            cis328             m1feedback         sioFile3
READMES            cis377             my.new.cmd         sort.manpage.Z
TEST               cis396q            new.login          spying.sio
arguments.sio      copy-files         newfile            test
beepscript.sio     demo               prokids            testdir
buckaroo           example            public-web         testme
bugTrack           file               say.hi             visible.ps_data

internet% copy-files sioFile1 sioFile2 sioFile3
internet% ls
OWL                cis325             m13com             say.hitoo
README             cis327             m1feedback         sioFile1
README.2           cis328             my.new.cmd         sioFile2
README2            cis377             new.login          sioFile3
READMES            cis396q            newFile1           sort.manpage.Z
TEST               copy-files         newFile2           spying.sio
arguments.sio      demo               newFile3           test
beepscript.sio     example            newfile            testdir
buckaroo           file               prokids            testme
bugTrack           file1              public-web         visible.ps_data
cis316             forLoopScript.sio  say.hi
internet%
15.2) Read try if you want
15.3) Read try if you want 
15.5) Read try if you want
15.4.all)
 
1