Prasad
Jun 7, 2012
sed command to identify date pattern yyyy-mm-dd hh:mm:ss.mse and replace with current date
sed -e "s/[0-9][0-9]\([0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\) \([0-9][0-9]\):\([0-9][0-9]\):\([0-9][0-9]\).\([0-9][0-9][0-9]\)/$(date +"%F %T.")$(($(date +%N)/1000000))/g" inputfile > newfile
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment