Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1.  
  2. # Hello World Program in Bash Shell
  3. #ls --help > test
  4. #while read name
  5. # do
  6. # echo "_________" $name
  7. #done < test
  8. Line[1]="I do not know which to prefer,"
  9. Line[2]="The beauty of inflections"
  10. Line[3]="Or the beauty of innuendoes,"
  11. Line[4]="The blackbird whistling"
  12. Line[5]="Or just after."
  13. # quoting permits embedding whitespace
  14. #Attribution
  15. Attrib[1]="Wallace Stevens"
  16. Attrib[2]="\"Thirteen Ways of Looking at a Blackbird\""
  17. for index in 1 2 3 4 5 #Five lines
  18. do
  19. printf " %s\n" "${Line[index]}" >> test1
  20. done
  21. for index in 1 2 #two attibution lines
  22. do
  23. printf " %s\n" "${Attrib[index]}" >> test2
  24. done
  25. echo "print from files test1 and test2"
  26. cat test1 test2
  27. echo "print from array"
  28. #output bold #Bold print
  29. for index in 1 2 3 4 5 #Five lines
  30. do
  31. printf " %s\n" "${Line[index]}"
  32. done
  33. for index in 1 2 #two attibution lines
  34. do
  35. printf " %s\n" "${Attrib[index]}"
  36. done
  37. #output sgr0 #Reset terminal
  38. echo
  39. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement