Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Scripting > Shell Script

Shell Script Shell Script Interview Questions, Learn by sharing Shell Script Interview Questions asked in various companies, Get Career advices, Interview Procedures from Shell Script experts, Post asked Shell Script Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 12:10 PM
Senior Member
 
Join Date: Feb 2008
Posts: 687
Default Write the Script to zip the files that generates

Write the Script to zip the files that generates automatically every few minutes ?
Reply With Quote
  #2 (permalink)  
Old 06-28-2008, 03:28 PM
Junior Member
 
Join Date: Jun 2008
Location: Bangalore
Posts: 10
Default

while true
do
for i in `ls *.arc` ;
do
ls *.arc 2> /dev/null
if [ $? -eq 0 ]
then
gzip $i
else
echo "No files to be zipped at this moment...Exiting"
exit 1
done
sleep 300
done
Reply With Quote
Reply

Tags
scripting, shell script, software

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On