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 nth 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.
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 nth 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.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education