Assignment 2 - Bash scripting Objective: To explore the basics of Bash scripting. Bash Shell Script Programming AssignmentUse the zip command (zip –r assignment2 sourcefiles) and upload your file...

Assignment 2 - Bash scripting
Objective: To explore the basics of Bash scripting.
Bash Shell Script Programming AssignmentUse the zip command (zip –r assignment2 sourcefiles) and upload your file assignment2.zip to the ecentennial Assignment 2 drop box.Create a directory named sourcefiles in your home directory.Question 1.
Create a shell script file called q1.sh
Write a script that would accept the two strings from the console and would display a message stating whether the accepted strings are equal to each other.
Question 2.
Create a shell script file called q2.sh
Write a bash script that takes a list of files in the current directory and copies them as into a sub-directory named mycopies.
Question 3.
Create a shell script file called q3.sh
Write a Bash script that takes the side of a cube as a command line argument and displays the volume of the cube.
Question 4.
Create a shell script file called q4.sh
Write a Bash script that prompts you for a user name and displays the corresponding user’s id number (UID), group id number (GID), and his/her home directory. Note: this information can be found in the /etc/passwd file.
Question 5.
Create a shell script file called q4.sh
Write a bash script that will edit the PATH environment variable to include the sourcefiles directory in your home directory and make the new variable global.


Assignment 2 - Bash scripting Objective: To explore the basics of Bash scripting. Bash Shell Script Programming Assignment Use the zip command (zip –r assignment2 sourcefiles) and upload your file assignment2.zip to the ecentennial Assignment 2 drop box. Create a directory named sourcefiles in your home directory. Question 1. Create a shell script file called q1.sh Write a script that would accept the two strings from the console and would display a message stating whether the accepted strings are equal to each other. Question 2. Create a shell script file called q2.sh Write a bash script that takes a list of files in the current directory and copies them as into a sub-directory named mycopies. Question 3. Create a shell script file called q3.sh Write a Bash script that takes the side of a cube as a command line argument and displays the volume of the cube. Question 4. Create a shell script file called q4.sh Write a Bash script that prompts you for a user name and displays the corresponding user’s id number (UID), group id number (GID), and his/her home directory. Note: this information can be found in the /etc/passwd file. Question 5. Create a shell script file called q4.sh Write a bash script that will edit the PATH environment variable to include the sourcefiles directory in your home directory and make the new variable global.
Feb 18, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here