#!/bin/bash # poem.sh: Pretty-prints one of the document author's favorite poems. # Lines of the poem (single stanza). 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." # Attribution. Attrib[1]=" Wallace Stevens" Attrib[2]="\"Thirteen Ways of Looking at a Blackbird\"" # This poem is in the Public Domain (copyright expired). echo for index in 1 2 3 4 5 # Five lines. do printf " %s\n" "${Line[index]}" done for index in 1 2 # Two attribution lines. do printf " %s\n" "${Attrib[index]}" done echo exit 0 # Exercise: # -------- # Modify this script to pretty-print a poem from a text data file.