The UNIX and Linux Forums  

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


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
quick script C shell ajp7701 Shell Programming and Scripting 1 03-18-2008 01:31 PM
need a quick basic shell script help eb222 Shell Programming and Scripting 6 11-22-2007 06:00 AM
Help needed in Shell Script nvuradi Shell Programming and Scripting 1 10-24-2007 02:56 AM
Help with awk/shell script needed! inditopgun Shell Programming and Scripting 3 07-20-2007 09:23 AM
IP Address changes - Quick Help Needed. gingerd2003 IP Networking 4 02-22-2007 08:39 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-31-2008
Registered User
 

Join Date: Aug 2007
Location: Bangalore
Posts: 288
Quick help needed in the Shell Script

Hiii,

i have a doubt here--
Quote:
DirCleanupList="logs tmp corefiles"
echo "$DirCleanupList" | perl -ne 'print join("\n", split(" ")) . "\n"; '
for dir in $DirCleanupList
do
BackupLocation="$BackupLocation/$dir"
mkdir -p $BackupLocation >/dev/null 2>&1
if [[ ! -d $BackupLocation ]]; then
echo "Unable to make backup directory: $BackupLocation"
continue
fi
done
I have to take backup of all the files inside directory dir(logs,tmp,corefiles) at the location $BackupLocation.i should take the backup of logs,tmp,corefiles inside the $BackupLocation directory and then remove the files and touch the files inside the directory dir(logs,tmp,corefiles).
else we can move the files from dir(logs,corefiles,tmp) to $BackupLocation then touch the file inside dir(logs,tmp,corefiles).

i appericicate your quick help.
Reply With Quote
Forum Sponsor
  #2  
Old 02-01-2008
Registered User
 

Join Date: Aug 2007
Location: Bangalore
Posts: 288
can anyone please give me some suggestions,i am stuck at one place,doing some combinations but that is not working for me.
Help m eout in this..
Thanks
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0