Script S1 (which copies .dat files from one directory1 to
another directory2) run continuously.
Write Script S2 which kills S1 first, compresses all .dat
files in directory1 and directory2 successfully, re-run
Script S1 and stops self i.e. S2.

Answer Posted / ganesh

Hi Vipul,

Script1 have to run continuously.. So,

Script1 should be

#!bin/sh

while true
do
cp directory1/*.dat directory2/
done

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of shell scripting?

592


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

584


How to print all the arguments provided to the script?

563


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

728


What can you do with powershell?

624






What are the different types of commonly used shells on a typical linux system?

558


is this growing field and what is average package in this?

1882


Is shell a scripting language?

580


What is meant by dos operating system?

590


madhar chod unix ke 10 commands dhang se likh nahi sakta hai

2986


What is the command to find out users on the system?

579


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

947


What is c in shell script?

652


What are the four fundamental components of every file system on linux?

1181


What is .sh file in mac?

565