[H-GEN] regular expressions
Jason Henry Parker
jasonp at uq.net.au
Mon Aug 21 21:55:29 EDT 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
Bruce Campbell <bc at humbug.org.au> writes:
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics. Please observe the list's charter. ]
>
> On Mon, 21 Aug 2000, Martin Pool wrote:
>
> mbp> On Sat, Aug 19, 2000 at 09:10:36AM +1000, Jason Henry Parker wrote:
> mbp>
> mbp> > I always trap my sed expressions in forward-quotes to hide them
> mbp> > completely from the shell. [ObPeeve: forward quotes cannot be
> mbp> > escaped from bash _at all_.]
> mbp>
> mbp> Perhaps I misunderstand you, but
> mbp>
> mbp> $ echo I think jason\'s wrong
>
> $ echo No matter which quotes you use, whether \"double\", \'single\' \
> in either \`direction\`, they can all be \\escaped under bash\(1\) . \
> And you can "do this inside \"another\" string like \'this\' ".
$ echo 'I don\'t think I\'m wrong'
>
(I'd often like to write something like:
$ perl -e'open FILH, "</etc/passwd" or die "Can't open /etc/passwd: $!\n"'
only to find I can't do it. It's incredibly annoying, but usually a
sign that the script needed to be a script and not a one-liner anyway.
jason, GNU bash, version 2.03.0(1)-release (i386-pc-linux-gnu)
--
``I worry that you'll work in an office ... have children ... celebrate
wedding anniversaries ... the world of heterosexuals is a sick and
boring life!'' -- Aunt Ida
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list