[ale] regex assistance

JD jdp at algoloma.com
Fri Jan 24 10:38:03 EST 2014


500 lines of bash?  I would have switched to perl about ... 400 lines ago. ;)

On 01/24/2014 09:57 AM, brock at quantifier.org wrote:
> 
> Thanks everyone. This gives me plenty to work with.  Regarding Bruno's question,
> there's nothing else on the line, though since it's one line, I can change that
> easily.  I tend to prefer bash, though I'm open to learning new things.  The
> whole thing is about 500 lines, so it's not too big, so the difference between
> sed and tr were negligible.
> 
> Thanks everyone,
> Robert
> 
> On Thu, 23 Jan 2014, Richard Bronosky wrote:
> 
>> Brock,
>> You didn't give us enough info to properly answer your question.
>> 1. Is there anything else on the line other than just a number?
>> 2. What language are you open to executing the regex in?
>> 3. How many lines are you expecting and do you care how long the one
>> pipe delimited line gets?
>> .!# Bruno #!.
>>
>>
>> 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?
>>>


More information about the Ale mailing list