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

shell script

Status
Not open for further replies.

kasavazala

Programmer
Jul 25, 2003
7
US
In the following script, I would like to see the time in the new file file1. But I am seeing ${timekey). Please let me know what to do.

d=`/usr/local/bin/cprevdate +2 | cut -f1 -d" "`
timekey=`ltime $d 000000`
sed 's/^/${timekey},/' file > file1

thanks in advance
 
Try something like this:
sed "s/^/${timekey},/" file > file1

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top