The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-06-2007
falcondown01 falcondown01 is offline
Registered User
 

Join Date: Sep 2007
Location: them crazy hills in Missouri
Posts: 3
to copy and repeat

Hi All,
I have done some looking at other threads but haven't found quite what I am looking for. I am a newbie to scripting and haven't got to where I want to you but here is my basic question. I have a script to copy a file and send it to another file with a date and time stamp. What I want to do is to be able to repeat this command within the script to happen every 30 (or 45 or 60) minutes. I have looked at doing a cron job but want more maual intervention to start and stop the script. So I am looking to just have the commands in the script repeat itself after a sleep. Here is the script I have so far:

#! /bin/sh
for i in `ls sband_log_error`
do
mv $i labfiles/int/sband/$i$(date +%F-%T)
done

Thanks,
falcondown01
Reply With Quote
Remove advertisements
!!
Forum Sponsor