Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CSC3320 System Level Programming Lab Assignment 5-Part 1 InLab Due by end of lab Purpose: Learn how to write basic shell script. In Chapter 2
CSC3320 System Level Programming Lab Assignment 5-Part 1 InLab Due by end of lab Purpose: Learn how to write basic shell script. In Chapter 2 and 3, you have learned a list of utilities. However, each time we could only type a single command on command line in terminal. It is inconvenient sometimes when a task has to been accomplished by multiple commands. For example, if the task needs to be repeated, you may have to restart the execution of the list of commands by typing the command one by one. For this reason, the shell script file is used to store the commands interpreted by shell. It is more than a regular file containing only the command. You can even write for loop, if else and switch case statement in the shell script. The shell script file can be executed directly by providing the name of it on command line. Part 1: Now it is your turn to create your first shell script file by following the steps below Step 1: Go to your home directory and create a new file named as simple.sh (vi simple.sh or nano simple.sh), then include following lines in your simple.sh. !bin/baah tMy First Shel1 Saript echo Welcome to CSC3320! Thia ia your first shell acript! cho "Author: YOUR FULL NAME " date Step 2: Save your file and exit editor Step 3: Execute this file by invoking its name. $ simple.sh uestion 11: What did you see in the output of step 3? CSC3320 System Level Programming Lab Assignment 5-Part 1 InLab Due by end of lab Purpose: Learn how to write basic shell script. In Chapter 2 and 3, you have learned a list of utilities. However, each time we could only type a single command on command line in terminal. It is inconvenient sometimes when a task has to been accomplished by multiple commands. For example, if the task needs to be repeated, you may have to restart the execution of the list of commands by typing the command one by one. For this reason, the shell script file is used to store the commands interpreted by shell. It is more than a regular file containing only the command. You can even write for loop, if else and switch case statement in the shell script. The shell script file can be executed directly by providing the name of it on command line. Part 1: Now it is your turn to create your first shell script file by following the steps below Step 1: Go to your home directory and create a new file named as simple.sh (vi simple.sh or nano simple.sh), then include following lines in your simple.sh. !bin/baah tMy First Shel1 Saript echo Welcome to CSC3320! Thia ia your first shell acript! cho "Author: YOUR FULL NAME " date Step 2: Save your file and exit editor Step 3: Execute this file by invoking its name. $ simple.sh uestion 11: What did you see in the output of step 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started