Help with sed/awk ?
From: Oxy (oxaze_at_hotmail.com)
Date: 04/19/04
- Next message: Peter Dierckx: "How to include 1 line after the last #include in a bunch of c-files ?"
- Previous message: Stefan Monnier: "Re: Epoch time"
- Next in thread: Michael Heiming: "Re: Help with sed/awk ?"
- Reply: Michael Heiming: "Re: Help with sed/awk ?"
- Reply: William Park: "Re: Help with sed/awk ?"
- Reply: Charles Demas: "Re: Help with sed/awk ?"
- Reply: rakesh sharma: "Re: Help with sed/awk ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Apr 2004 11:14:23 -0700
Hello all,
When I dump (parts) of a postgres database into a textfile I get it in
the following format (each users data on three rows). The reason for
it is probably that the last field contain cr/lf characters.
-------------------------------------------------------
45|User1|Lastname||555-12345||Fakestreet 1
ODF4/145:146
dBm: 13.3
46|User2|Lastname||555-12346||Fakestreet 2
ODF2/43:44
dBm: 13.42
47|User3|Lastname||555-12347||Fakestreet 3
ODF5/7:8
dBm: 13.36
-------------------------------------------------------
What I want but haven't been able to achieve is to join each users
data into one single line. Move/append all text on line two to the
end of line one (separating each lines data with a comma) and then
do the same for all text on line three onto the end of line two.
I assume this can be done using sed or maybe even awk - but can
someone tell me the correct syntax for it ?
Thanks!
// O
- Next message: Peter Dierckx: "How to include 1 line after the last #include in a bunch of c-files ?"
- Previous message: Stefan Monnier: "Re: Epoch time"
- Next in thread: Michael Heiming: "Re: Help with sed/awk ?"
- Reply: Michael Heiming: "Re: Help with sed/awk ?"
- Reply: William Park: "Re: Help with sed/awk ?"
- Reply: Charles Demas: "Re: Help with sed/awk ?"
- Reply: rakesh sharma: "Re: Help with sed/awk ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|