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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting date stamp into output file

Status
Not open for further replies.

SirB

IS-IT--Management
Oct 23, 2008
8
0
0
US
Hi I have got an Unix script that produces a path, putting files.

Command:

> ./Output/change_owner$date.de/datafiles/$infoart/1/$identifikator/sidis_io.xml

What I would like to do, is to add the date stamp to it.

Any ideas how to do this?

kind regards
 
Hi

I do not really understand what you want. Taking "produces a path" as keywords I assume :
Code:
date="$( date )"
mkdir -p "./Output/change_owner$date.de/datafiles/$infoart/1/$identifikator/sidis_io.xml"

Feherke.
 
OR:
What I would like to do, is to add the date stamp to it.

Code:
outfile="./Output/change_owner$date.de/datafiles/$infoart/1/$identifikator/sidis_io.xml"

echo `date` >> ${outfile}

I hope that helps.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top