From: David Douthitt Date: 2002-06-14T23:12:00+09:00 Subject: Re: UNIX pipes This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. ----=_NextPart_ST_09_11_56_Friday_June_14_2002_988 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable >>> dossy@panoptic.com 6/13/02 7:27PM >>> > On 2002.06.14, David Douthitt wrote: > > What's the accepted way to use a UNIX pipe? I wound up using Ruby > > commands instead of sed... > > Why use sed when Ruby already has regex? I'd > certainly just take the output of gunzip and > process it in Ruby rather than with another > process (sed). I'm used to using ksh - in fact, I write in ksh more the Ruby, Perl, and C = put together (sorry...) Ruby's gsub(pat, str) form never felt "right" - I kept wanting s/pat1/pat2/= - and why not? I really am curious... Instead of: "My string".gsub(/My/, "His") =2E..why not? "My string".s/My/His/ =2E...? David Douthitt CUNA & Affiliates UNIX Systems Administrator ddouthitt@cuna.coop (608) 231-4922 ----=_NextPart_ST_09_11_56_Friday_June_14_2002_988 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

>>> dossy@panoptic.com 6/13/02 7:27PM >>>
>= ; On=20 2002.06.14, David Douthitt <DDouthitt@cuna.coop> wrote:
> > What's the accepted way to use a UNIX pipe?  I wound up using Ruby
= >=20 > commands instead of sed...
>
> Why use sed when Ruby alrea= dy=20 has regex?  I'd
> certainly just take the output of gunzip and
> process it in Ruby rather than with another
> process (sed).
 
I'm used to using ksh - in fact, I write in ksh more the Ruby, Perl, a= nd C=20 put together (sorry...)
 
Ruby's gsub(pat, str) form never felt "right" - I kept wanting s/pat1/= pat2/=20 - and why not?  I really am curious...
 
Instead of:
 
"My string".gsub(/My/, "His")
 
...why not?
 
"My string".s/My/His/
 
....?
 
 
David Douthitt
CUNA & Affiliates
UNIX Systems Administrator<= BR>ddouthitt@cuna.coop
(608)=20 231-4922
----=_NextPart_ST_09_11_56_Friday_June_14_2002_988--