The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 04:31 PM
need a quick basic shell script help eb222 Shell Programming and Scripting 6 11-22-2007 09:00 AM
Help needed in Shell Script nvuradi Shell Programming and Scripting 1 10-24-2007 05:56 AM
Help with awk/shell script needed! inditopgun Shell Programming and Scripting 3 07-20-2007 12:23 PM
IP Address changes - Quick Help Needed. gingerd2003 IP Networking 4 02-22-2007 11:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-01-2008
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
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.
  #2 (permalink)  
Old 02-01-2008
namishtiwari namishtiwari is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2007
Location: Bangalore
Posts: 377
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0