I want to add date & time at the begging of each line in some file
I used sed in order to add the date & time before each line in file
please advice what I need to update in my sed in order to support this action ,
I can accept other solution with awk or perl one liner etc ...
# date="[`date +%d"/"%b"/"%G"-"%T`]"
# echo $date
[21/Feb/2013-14:07:58]
# sed "s/^/$date /" file
sed: command garbled: s/^/[21/Feb/2013-14:07:58] /
example
file before edit
param1=3478374
param2=34128374
param3=34783743
file after edit
[21/Feb/2013-14:07:58] param1=3478374
[21/Feb/2013-14:07:58] param2=34128374
[21/Feb/2013-14:07:58] param3=34783743