Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a directory with a date in the field.

Status
Not open for further replies.

JamesNicholls

Vendor
Nov 28, 2002
8
GB
Quick question - I'm writing a script to create a directory structure for deployment in builds. The script starts by copying the existing structure. I want to date/time stamp the directory name so that a history is kept.

So I'm doing something like:

oldbuild=old_build_'date '+%d%m%y%H%M''
cp -r directories archive/$oldbuild

I can't get the data to appear in %oldbuild. Can ayone point out what I'm doing wrong?
 
the 'outter' quotes should be BACKquotes.

oldbuild=old_build_`date '+%d%m%y%H%M'` vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top