Quote:
Originally Posted by monicasgupta
wow thanks Perderabo it worked like a charm!!! but it is creating one more extra file also i.e, whatever.txt. I dont want this file. I really appreciate ur input.
39 Mar 2 05:42 100whatever.txt
39 Mar 2 05:42 200whatever.txt
39 Mar 2 05:42 300whatever.txt
2 Mar 2 05:42 whatever.txt
THanks
Monica
|
you must have some blank lines. You can ignore blank line by checking if the number of fields is non-zero....
awk -v timestamp=whatever 'NF {print $0 >> ($1timestamp".txt")}' data
And you're supposed to replace "whatever" with your timestamp.