edit multiple lines of a text file into 1 line:
hi, i got a file like this:
Code:
carrier-1 09-04-09_07:36:19 Code:
carrier-1 09-04-09_07:36:19 Carrier Totals: 14245 5376298.39 |
Use the N command of sed to add the next line to the pattern space, then substitute the newline with a space and remove the spaces at the beginning of the second line:
Code:
sed '$!N;s/\n/ /;s/ //' file |
awk
Code:
# awk 'ORS=(NR%2)?" ":"\n"' file |
All times are GMT -5. The time now is 06:41 PM. |