Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How will you copy a file from one machine to other?

944


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

1111


Explain about gui scripting?

1040


How will you connect to a database server from linux?

988


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

930


What is difference between shell and bash scripting?

936


Is shell scripting a language?

978


What are the different types of shell scripting?

1031


Given a file find the count of lines containing the word "abc".

1491


How do we create command aliases in a shell?

936


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

2243


What is the use of break command?

1037


How does path variable work?

905


What is basename in shell script?

1009


What is a batch file used for?

1027