The shell scripting exercises sheet 1 Provide screen shots for all output its necessary 1. Write a script Prog1 callable with one argument (the name of a directory) and displays as output the contents of that directory. 2. Write a script Sum callable with two arguments (integers) and displays their sum on the screen 3. write a script Prog2 callable with a parameter and displays on the screen if it is a file, directory or neither file nor directory 4. Write script Prog3 to concatenate two files f1 and f2 into a file f3 and display the number of words of f3 (f1 and f2 must be created beforehand). 5. Write a script Prog4 which: • Create a directory Rep . © Create in that directory the file liste1 containing a detailed list of files and directories existing in the current directory. • Make a copy of the file list1 under the name list2 in Rep • Remove the file List1. 6. Write a script Prog5 which: Read a value from user and create a pattern as mentioned above Sample Execution / Output: # sh prog5 Give the value of n 3 The pattern is: 1 1 2 123 7. User must provide two numbers and operator through command-line output. Sampie Execution #sh calculator 25+ 41 67 #sh calculator 10 * 5 50 System Administration/ Spring 2023 / CIT / Page |

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2E: Create a program named FileComparison that compares two files. First, use a text editor such as...
icon
Related questions
Question
Help me please
The shell scripting exercises sheet 1
Provide screen shots for all output its necessary
1. Write a script Prog1 callable with one argument (the name of a directory) and displays
as output the contents of that directory.
2. Write a script Sum callable with two arguments (integers) and displays their sum on
the screen
3. write a script Prog2 callable with a parameter and displays on the screen if it is a file,
directory or neither file nor directory
4. Write script Prog3 to concatenate two files f1 and f2 into a file f3 and display the
number of words of f3 (f1 and f2 must be created beforehand).
5. Write a script Prog4 which:
• Create a directory Rep
.
© Create in that directory the file liste1 containing a detailed list of files and
directories existing in the current directory.
• Make a copy of the file list1 under the name list2 in Rep
• Remove the file List1.
6. Write a script Prog5 which: Read a value from user and create a pattern as
mentioned above
Sample Execution / Output:
# sh prog5
Give the value of n
3
The pattern is:
1
1 2
123
7. User must provide two numbers and operator through command-line
output.
Sampie Execution
#sh calculator 25+ 41
67
#sh calculator 10 * 5
50
System Administration/ Spring 2023 / CIT / Page |
Transcribed Image Text:The shell scripting exercises sheet 1 Provide screen shots for all output its necessary 1. Write a script Prog1 callable with one argument (the name of a directory) and displays as output the contents of that directory. 2. Write a script Sum callable with two arguments (integers) and displays their sum on the screen 3. write a script Prog2 callable with a parameter and displays on the screen if it is a file, directory or neither file nor directory 4. Write script Prog3 to concatenate two files f1 and f2 into a file f3 and display the number of words of f3 (f1 and f2 must be created beforehand). 5. Write a script Prog4 which: • Create a directory Rep . © Create in that directory the file liste1 containing a detailed list of files and directories existing in the current directory. • Make a copy of the file list1 under the name list2 in Rep • Remove the file List1. 6. Write a script Prog5 which: Read a value from user and create a pattern as mentioned above Sample Execution / Output: # sh prog5 Give the value of n 3 The pattern is: 1 1 2 123 7. User must provide two numbers and operator through command-line output. Sampie Execution #sh calculator 25+ 41 67 #sh calculator 10 * 5 50 System Administration/ Spring 2023 / CIT / Page |
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT