Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Hello World Program in Bash Shell
- #ls --help > test
- #while read name
- # do
- # echo "_________" $name
- #done < test
- Line[1]="I do not know which to prefer,"
- Line[2]="The beauty of inflections"
- Line[3]="Or the beauty of innuendoes,"
- Line[4]="The blackbird whistling"
- Line[5]="Or just after."
- # quoting permits embedding whitespace
- #Attribution
- Attrib[1]="Wallace Stevens"
- Attrib[2]="\"Thirteen Ways of Looking at a Blackbird\""
- for index in 1 2 3 4 5 #Five lines
- do
- printf " %s\n" "${Line[index]}" >> test1
- done
- for index in 1 2 #two attibution lines
- do
- printf " %s\n" "${Attrib[index]}" >> test2
- done
- echo "print from files test1 and test2"
- cat test1 test2
- echo "print from array"
- #output bold #Bold print
- for index in 1 2 3 4 5 #Five lines
- do
- printf " %s\n" "${Line[index]}"
- done
- for index in 1 2 #two attibution lines
- do
- printf " %s\n" "${Attrib[index]}"
- done
- #output sgr0 #Reset terminal
- echo
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement