Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Bash Shell Script Programming Assignment
**Make sure to name the script file as it mentions**
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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 9 images
Knowledge Booster
Similar questions
- Simple SHELL (.sh) script Write a SHELL script (minExF.sh) that takes a csv file ("Comma Separated Values", a text file that can be manipulated by Excel) as an argument containing the grades of the mid-term (called intra) exams with the passing thresholds and calculates the minimum grades that must be obtained in the Final exam by adding them as a column to the initial information in the output file. Note: To manipulate large integers and real numbers use the Unix command bc . Here is an example of how to use of this command to add two non-integer numbers stored in the variables VAR1 and VAR2 : VAR1=5.5VAR2=3.14159RESULT='echo $VAR1+$VAR2 | bc'echo $RESULT The result displayed on the screen will be 8.64159. The first line contains titles (mid-terms, weight mid-term, weight final, treshold). The following lines contain information about the Intra (mid-term) exam scores, exam weights and weighting of the exams and the cut-off points for the two exams, Intra (mid-term) and Final.arrow_forwardQUESTION 7 An unchecked exception is an exception that a programmer should be able to anticipate and appropriately handle. O True O False QUESTION 8 A file is a persistent data structure - data written to a file exists even after your program terminates. O True Falsearrow_forwardcreateDatabaseOfProfiles(String filename) This method creates and populates the database array with the profiles from the input file (profile.txt) filename parameter. Each profile includes a persons' name and two DNA sequences. 1. Reads the number of profiles from the input file AND create the database array to hold that number profiles. 2. Reads the profiles from the input file. 3. For each person in the file 1. creates a Profile object with the information from file (see input file format below). 2. insert the newly created profile into the next position in the database array (instance variable).arrow_forward
- * Question Completion Status: QUESTION 11 Wite a program (mymv infile outfile) to rename a infile as outfile using file system calls, link(), and unlink() For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph Arial 10pt P. QUESTION 12 Write a program that takes the file name as the command line argument and outputs the size of the file in byte the file) !! !!!arrow_forward2. This involves a .txt file with one thousand rows of random numbers (between 1-1000) Using Python, create a program to perform this task, with 3 methods of doing this: Read the entire contents of file1.txt into memory, then process each row. Read one row of file1.txt at a time and process it. Split file1.txt into 2 parts and read each part into memory separately.arrow_forwardPython question: I have a .py file in another folder in the same directory how do I import that file into another .py file? For example, my directory folder is called "School_Work" I have 2 folders: Helper_Functions Main_Driver In my Helper_Functions folder I have the file called helper_functions.py and in my main driver I have a file called main.py. I want to import helper_functions.py into main.py. How do I do that?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY