Question: Part 1 Create a shell script named yourname-script that would do: redirect a string Student name is into a file Log-file; append the current date
Part 1
- Create a shell script named yourname-script that would do:
- redirect a string Student name is
into a file Log-file; - append the current date and time information to the file Log-file;
- append the string My terminal logical name is
to the file Log-file; use the command tty. - learn the name of your machine using the command uname and append the string My machine name is
to the file Log-file;
- redirect a string Student name is
-
Part 2
-
- read the input from the keyboard;
- make the following selections:
- if this is choice one,
- display the string My files ;
- perform the listing command on your directory;
- append the result to the file Log-file;
- if this is choice two,
- display the string My directory ;
- perform the viewing of current directory command ;
- append the result to the file Log-file;
- if this is choice three,
- display the string Calendar of this month is
cal> ; - append the result to the file Log-file;
- display the string Calendar of this month is
- in all other choices,
- display the string Wrong choice ;
- append the result to the file Log-file;
- if this is choice one,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
