[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] sed help
- Subject: [ale] sed help
- From: ale at cogginsnet.com (Robert Coggins)
- Date: Sat, 28 Jan 2006 00:47:32 -0500
- In-reply-to: <[email protected]>
- References: <[email protected]>
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
>