almost the same as the other sed but you only need to pipe it once if
you want to replace one character. sed -e "s:@::g"
the 's' is for substitute the colans seperate the command and its
arguments first @ is the regex or pattern to search for the empty
space between :: is the argument for what to replace @ with so
s:@:@address.com:g would append address.com to every @ in the stream
piped to sed. the 'g' makes the command continue searching and
replaceing untill the end of the stream, if you leave out the g only
the first match will be replaced. Correct me if I'm wrong. vim also
has this functionality. you can load the file in vim and do :%s/@//g
and get the same results, but beware vim requires more escapeing than
sed so that may be :%s/\@//g
On Tue, 3 Aug 2004 08:49:49 -0700 (PDT), John Hebert
<[EMAIL PROTECTED]> wrote:
> --- John Hebert <[EMAIL PROTECTED]> wrote:
> > Howdy,
> >
> > I have a bunch of text with multiple tokens in it
> > demarcated by { and }.
> >
> > Sample text:
> > this is some {text1}. this is more {text2}. and yet
> > some more {text3}. blahdeblah.
>
> Just realized that instead of using { and }, I should
> some other character to demarcate my tokens, let's say
> @, so the sample text should be:
>
> this is some @[EMAIL PROTECTED] this is more @[EMAIL PROTECTED] and yet
> some more @[EMAIL PROTECTED] blahdeblah.
>
> > What would a regular expression to get these tokens
> > out of the text look like, in a Perl script, say?
>
> Or rather than Perl, any common Unix tool that uses
> RE, like sed, awk, etc.
>
> Thanks.
>
>
>
> > Thanks,
> > John
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://brlug.net/mailman/listinfo/general_brlug.net
> >
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail
>
> _______________________________________________
> General mailing list
> [email protected]
> http://brlug.net/mailman/listinfo/general_brlug.net
>