[ale] sed help
Robert Coggins
ale at cogginsnet.com
Sat Jan 28 00:47:32 EST 2006
Thanks to all for your help. I found the solution. I stuck this in a
for loop
sed -e $!N;/\n,,,,,$/!{P;D;};N;s/\n,,,,,\n/,,,,,/
Thanks again for all of you who were looking into this!
Robert Coggins wrote:
> OK all I hate asking questions like this on here but here we go.
>
> I have a series of files. In each of the files there are many lines that
> only have ,,,,, on them. For every line I find in these files I want to
> bring the previous line, the ,,,,, line and the next line together.
>
> Example:
>
> 21321asdf2d6f5
> ,,,,,
> fdsdhfksd6df5+sdf
>
> seded to :
>
>
> 21321asdf2d6f5,,,,,fdsdhfksd6df5+sdf
>
> Here is what I am trying but it is not working...
> sed "s/\n,,,,,\n/,,,,,/g
>
> Thanks in advance for your help!
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
More information about the Ale
mailing list