Question: 1.Write a shell script program that accepts a file name from the user, displays the file to you using the less command, then calls the

1.Write a shell script program that accepts a file name from the user, displays the file to you using the less command, then calls the editor (command is geany) to allow you to edit that file, once you quit the text editor, your shell script will continue to run. It should then display the file using the lesscommand again. Make some changes in the text editor so you can see that the file has changed. Do not forget to test if the file exists before you attempt to do anything with it. If it does not exist then output an appropriate error message.

2.Write a shell script program to provide the following facilities to a user in the form of a menu: Allow the user to use an editor e.g. geany (which can be called from the command line using geany filename) to write a poem. Run a word count on your poem using wc Display the output to the screen and display a page at a time using more or less (ask the user which one they want to use). Sort the output using the UNIX sort command and put the results into a file, then display the output of the sorted file using cat or more. (ask the user which one they want to use) Exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!