Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions