Related questions
Concept explainers
System Administration
Shell Scripts: exercises sheet 2
Exercise 1 :
Write a shell script that displays the contents of the directories existing in a directory given as
argument (use the for loop)
Exercice 2 :
Write a shell script that displays the contents of subdirectories of the directories that are given as
arguments. The script should be called with any number of parameters.
Exercice 3 :
Write a shell script that displays the n
th
line of a file(you can use head and tail). The integer n and
the input file name are given by the user in response to the request of the script (use the command
read). Try to do all possible tests (file exists or not etc ...)
Exercise 4 :
Write a shell script that give a variable x the following content "School man women fish dog cat
sheep" and then print each word in a separate line on the screen (use the for loop).
Exercise 5 :
Propose a shell script that displays the number of files in the present working directory .
to generate a solution
a solution
- Text book imageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageText book imageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Text book imageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- Text book imageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTText book imageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningText book imageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning