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.
|