Question: Write shell Script for the following (a)Write a script that will search for a specific word in all the files in the current dictionary and

Write shell Script for the following

(a)Write a script that will search for a specific word in all the files in the current dictionary and then prompt with the file name in which word is found. (b)Write a script to print only number of executable files, and number of text files in each sub-dir of the argument directory specified. (c) Write a shell script that is able to backup all the C files to your current directory. (d) Write a shell script to print all files starting with name exam****.** and can have any extension. (e) Write a shell script file named exercise2.sh that makes a list of files in your home directory that were changed less than 24 hours ago, but leave out directories. (f) Write a shell script that accepts a positive integer value from the user, say 34, and prints out all the divisors of 34 as a list: Enter a positive integer: 34 The divisors of 34 are : 1 , 2 , 17 , and 3 4 .

(g) Write a shell script that swaps the contents of two files. Create the swap.sh. Script should take two arguments as input that indicate the two files to be swapped. You should check that the proper number of arguments has been passed and that the filenames passed on the command line have the proper permissions set. You should also check that any temporary files used during the execution of the script do not exist. If any of these checks fail, then print an appropriate error message and exit the script with a status of one. If all of the checks pass, then swap the two specified files and print a message indicating that the two files have been swapped

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!