Write complete bash script that provides a menu to either double-space an input file or triple space an input file. Use the read command to obtain the users choice and then perform the requested...


Write complete bash script that provides a menu to either double-space an input file or triple space an input file. Use the read command to obtain
the users choice and then perform the requested operation.
For double spacing, the script will ask for an input file and then read each
line of the input file. For each line read, it then writes the line back to
another file, but with an extra blank line following. This has the effect of
double spacing the file. Include all necessary code to check if the read
command gets the necessary filename, and whether the specified file

exists. If so, continue with the double spacing, if not state that the filename
was blank or does not exist and end the script.
For triple spacing, the script will ask for an input file and then read each line
of the input file. For each line read, it then writes the line back to another
file, but with two extra blank lines following. This has the effect of triple
spacing the file. Include all necessary code to check if the read command
gets the necessary filename, and whether the specified file exists. If so,
continue with the triple spacing, if not state that the filename was blank or
does not exist and end the script. Use while loops, if statements and test file operators. (Usage: spacingFile.sh



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here