in reply to Re: Merge pairs of lines
in thread Merge pairs of lines
My attempt,
assumes non-blank lines come in pairs.perl -pe '$_=/\S/?do{chop;$_.",".<>}:""'
Yours doesn't look right to me though...
286,0 sauoq@grover:~$ perl -l054p012e'($\,$a)=($a||$\,$b||$/);$b=$\' < + test.txt a,b ,c d,287,0 sauoq@grover:~$ cat test.txt a b c d 288,0 sauoq@grover:~$
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Merge pairs of lines
by Aristotle (Chancellor) on Jan 31, 2003 at 06:00 UTC |