Web hosting services - MYADDRESSBOOK=”$HOME/addressbook” if [ ! -f “$MYADDRESSBOOK” ] ;
MYADDRESSBOOK=”$HOME/addressbook” if [ ! -f “$MYADDRESSBOOK” ] ; then printERROR “$MYADDESSBOOK does not exists, or is not a file.” exit 1 fi and awk -F: ‘{ printf “%-10s %sn%-10s %sn%-10s %sn%-10s %snn”, “Name:”,$1,”Email:”,$2,”Address:”,$3, “Phone:”,$4 ; }’ How might you rewrite these script fragments so that they can be shared between these scripts instead of being replicated in both? 4. The delperson script uses the grep command to generate a list of matching entries. This might confuse the user in the following instance: $ ./delperson.01 to Name: James T. Kirk Email: jim@enterprise.mil Address: 1701 Main Street Anytown Iowa Phone: 555-555-5555 Delete this entry (y/n)? [n] Here the to in Anytown was matched. What changes should be made to the delperson script so that only those entries whose names match the user-specified name are selected for deletion? (HINT: Use the sed command instead of grep). 5. If the delperson script gets a signal while it is processing deletes, all the intermediate files are left behind. What can be done to prevent this? Sams Teach Yourself Shell Programming in 24 Hours Contents Index Hour 22: Problem Solving with Shell Scripts Previous Chapter Next Chapter Sections in this Chapter: Moving Directories Questions Maintaining an Address Book Terms Summary Previous Section Next Section Copyright Macmillan Computer Publishing. All rights reserved.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.