Create a script that asks the user for a file and then


Please create two scripts for UNIX/Linux

1. Create a script that asks the user for a file and then appends the date to the file the user has entered. Let the user know if the file can or cannot be written too. Also, if the file does not exist create the file and write the date in the newly created file. Lastly display to the user the file, including a statement letting them know that the file has changed. (Hint remember the -f and -w when evaluating a file in an if statement)

 2. Create a script that takes two numbers as input from the user, and then asks the user if they would like to add or subtract the two numbers (use a case statement). Then print out the result in a friendly message. Be sure to let the user know if they choose an option that was not on the menu. You will need to use expr (expression) command when evaluating, as in number='expr $num1 + $num2' along with the backquotes to store the results in the number variable (also note the s p a c e s).

Now modify your case statement so the user can use either an upper or lower case letter in the menu. That is if the user types a or A both will allow the case statement to run the add selection. (Hint use | as the or operator)

 

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create a script that asks the user for a file and then
Reference No:- TGS01087228

Expected delivery within 24 Hours