[olug] Character Removal

Obi-Wan obiwan at jedi.com
Fri Oct 19 19:12:19 UTC 2007


>> Perl has its uses, but is overly bloated for such a simple operation.
>> Sed(1) does a wonderful job of this sort of thing.  Assuming you want
>> to keep the first and last parentheses:
> 
> I used to use sed, but stopped upon learning how unportable it was.

The Unix regex library that drives sed hasn't changed materially
in decades.  Sed works the same on every version of Unix (and now
Mac OS/X) that I've ever used in the last 17 years.  Running it
in Windoze does require using Cygwin or another add-on kit, but
perl isn't much different in that regard.

I'd be curious to hear what sort of portability issues you encountered.

-- 
Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
   The stuff of earth competes for the allegiance I owe only to the
     Giver of all good things, so if I stand, let me stand on the
       promise that You will pull me through.  -- Rich Mullins



More information about the OLUG mailing list