Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

3. What may be the goal of the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago