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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 01-25-2008
Karthikeyan_113 Karthikeyan_113 is offline
Registered User
  
 

Join Date: Jan 2007
Location: Boston, USA
Posts: 16
Thumbs up Try this

Try the following i got the exact result that you were expecting.

newdir=`basename $BackupLocation`
BackupLocation=$BackupLocation/$newdir$(date +%w)

################################################
$ > BackupLocation=abc/namsih
$ > newdir=`basename $BackupLocation`
$ > BackupLocation=$BackupLocation/$newdir$(date +%w)
$ > echo $BackupLocation
abc/namsih/namsih5
$ >
################################################

Let me know in case of any concerns.

Thanks,
Karthikeyan.