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 Mike Lewis 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 put real time from date command while running script

Status
Not open for further replies.

sukchai

IS-IT--Management
Dec 12, 2002
3
0
0
SG


I used awk command for arrange data.
awk -f script.sh input.file > output.file
#output.file
4549659
5807257
05720
8450405

How can I put real time from date command while running script in front of these data?

 
try this:
function awkdate() {
cmd = "date + format string"
cmd | getline mydate
if (mydate) {
printf "%s\n", mydate
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top