Hello All,
I've been busy trying to organize a 'chaotic' file and
after using ex and pattern searching in a bash script I
reached this almost final format.
But, anymore caffeine and I will never ever sleep again.
Any help here...is highly appriciated!
I have a file like this:
RXG-1 55001
RXG-2 55002
RXG-3 55003
RXG-4 55161
55162
55163
RXG-6 55211
55213
RXG-7 55231
55232
55233
RXG-8 55836
<end>
basically 2 columns, but (and you feel it coming)
I need to take col1 from the previous line IF on the current line col1 is empty and pipe it to a file resulting in
col1 col2 both populated where col1 is repeated from a previous line when empty.
There are sometimes none, 1, or 2 occurences of an empty col1 but, how else possible, this can also vary :/
Again, any help is welcome!
Iga
I've been busy trying to organize a 'chaotic' file and
after using ex and pattern searching in a bash script I
reached this almost final format.
But, anymore caffeine and I will never ever sleep again.
Any help here...is highly appriciated!
I have a file like this:
RXG-1 55001
RXG-2 55002
RXG-3 55003
RXG-4 55161
55162
55163
RXG-6 55211
55213
RXG-7 55231
55232
55233
RXG-8 55836
<end>
basically 2 columns, but (and you feel it coming)
I need to take col1 from the previous line IF on the current line col1 is empty and pipe it to a file resulting in
col1 col2 both populated where col1 is repeated from a previous line when empty.
There are sometimes none, 1, or 2 occurences of an empty col1 but, how else possible, this can also vary :/
Again, any help is welcome!
Iga