[ale] regex assistance

James Sumners james.sumners at gmail.com
Thu Jan 23 14:40:44 EST 2014


http://stackoverflow.com/questions/1251999/sed-how-can-i-replace-a-newline-n

On Thu, Jan 23, 2014 at 1:09 PM, brock at quantifier.org
<brock at quantifier.org> wrote:
>
> Hello, linux neighbors,
>
> I am a regular expression amateur.  I have a text file with a bunch of
> numbers, which looks like this:
>
> 00
> 01
> 02
> 03
> 04
>
> and I need to convert it, so that each number is on one line, and separated
> with the | pipe, so:
>
> 00 | 01 | 02 | 03 | 04
>
> If it's not too much trouble, could someone script-fu something up to solve
> my problem?
>
> Thanks much,
> Robert
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



-- 
James Sumners
http://james.roomfullofmirrors.com/

"All governments suffer a recurring problem: Power attracts
pathological personalities. It is not that power corrupts but that it
is magnetic to the corruptible. Such people have a tendency to become
drunk on violence, a condition to which they are quickly addicted."

Missionaria Protectiva, Text QIV (decto)
CH:D 59


More information about the Ale mailing list