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

How can I get a time stamp to use as a variable in a file?

Status
Not open for further replies.

linuxMaestro

Instructor
Jan 12, 2004
183
US
I tried:
time=$(time +%H:%M:%S);

but

echo $time comes up blank.

How can I get a time stamp?
 
time=$(date +%H:%M:%S);

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top