On Oct 20, 2005, at 9:24, Kamalraj Singh Madhan, Noida wrote:
Now I want to add the current date to the name of the zipped up file
i.e. to the variable named 'filen' in the above script...
Is there any date function in shell scripting which can solve this
problem? Kindly suggest.
Yes, you can do something like this:
today=`date "+%Y-%m-%d"`
backup=~/tmp/backup-${today}.pax
-- fxn
PS: I guess you were asking this in a mailing list about Perl in case
some Perl one-liner could solve it the way date(1) does, but the
idiomatic solution in sh is date(1).
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>