r) remove_records;; f) find_cd y;; u) (Web hosting solutions) update_cd;; c)

r) remove_records;; f) find_cd y;; u) update_cd;; c) count_cds;; l) list_tracks;; b) echomore $title_fileechoget_return;; q | Q ) quit=y;; *) echo Sorry, choice not recognized ;; esacdone#Tidy up and leaverm -f $temp_fileecho Finished exit 0Notes on the ApplicationThe trapcommand at the start of the script is intended to trap the user s pressing of Ctrl+C. This maybe either the EXITor the INTsignal, depending on the terminal setup. There are other ways of implementing the menu selection, notably the selectconstruct in bash and ksh(which, isn t, however, specified in X/Open). This construct is a dedicated menu choice selector. Check itout if your script can afford to be slightly less portable. Multiline information given to users could alsomake use of here documents. You might have noticed that there s no validation of the primary key when a new record is started; thenew code just ignores the subsequent titles with the same code, but incorporates their tracks into the firsttitle s listing: 1 First CD Track 12 First CD Track 21 Another CD2 With the same CD keyWe ll leave this and other improvements to your imagination and creativity, as you can modify the codeunder the terms of the GPL. SummaryIn this chapter, we ve seen that the shell is a powerful programming language in its own right. Its abilityto call other programs easily and then process their output makes the shell an ideal tool for tasks involv- ing the processing of text and files. Next time you need a small utility program, consider whether you can solve your problem by combiningsome of the many Linux commands with a shell script. You ll be surprised just how many utility programsyou can write without a compiler. 90Chapter

WordPress database error: [Table 'armadillowebhosting_com_-_apache.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '198' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply