
piper68
Novice
Mar 14, 2010, 1:06 PM
Post #3 of 7
(2495 views)
|
|
Re: [FishMonger] parsing a line of numbers
[In reply to]
|
Can't Post
|
|
I've tried this and works but is there a way to write this more simple? thanks. perl -pe '/UTC[\s]+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/;$_=($1)?"$1,\n$2,\n$3,\n$4,\n$5,\n$6,\n$7,\n$8,\n$9,\n$10,\n$11,\n$12,\n$13,\n$14,\n$15,\n$16,\n$17,\n$18,\n$19,\n$20,\n$21,\n$22,\n$23,\n$24,":""' $TXT_PATH/a.txt > $TXT_PATH/b.txt
(This post was edited by piper68 on Mar 14, 2010, 1:07 PM)
|