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

  1. Create a shell script named yourname-script that would do:
    1. redirect a string Student name is into a file Log-file;
    2. append the current date and time information to the file Log-file;
    3. append the string My terminal logical name is to the file Log-file; use the command tty.
    4. learn the name of your machine using the command uname and append the string My machine name is to the file Log-file;
  2. Part 2

    1. read the input from the keyboard;
    2. make the following selections:
      • if this is choice one,
        1. display the string My files ;
        2. perform the listing command on your directory;
        3. append the result to the file Log-file;
      • if this is choice two,
        1. display the string My directory ;
        2. perform the viewing of current directory command ;
        3. append the result to the file Log-file;
      • if this is choice three,
        1. display the string Calendar of this month is cal> ;
        2. append the result to the file Log-file;
      • in all other choices,
        1. display the string Wrong choice ;
        2. append the result to the file Log-file;

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!