Date: Sun, 26 Dec 1999 15:48:22 +0000 From: Mark Ovens <mark@ukug.uk.freebsd.org> To: aunty <aunty@comcen.com.au> Cc: freebsd-questions@freebsd.org Subject: Re: shell quoting problem? Message-ID: <19991226154822.C327@marder-1> In-Reply-To: <19991227014716.D17780@comcen.com.au> References: <19991227014716.D17780@comcen.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 27, 1999 at 01:47:16AM +1100, aunty wrote:
> After setting some variables in a bourne shell script, I want it
> to run a command like
> finger @nas1 | egrep "Host|tom|dick|harry"
> where nas1, tom, dick, and harry are expanded from variables.
>
> I can see _why_ things like this don't work
> finger \@${serv} | egrep \"Host${pipes-and-names}\"
> but can't figure out how to get all those quotes and pipes behaving.
>
> Is there a way to do this or must I resort to perl?
>
Not quite sure exactly what you are trying to do here, but whenever I
use egrep(1) I always use ``()'' thus:
# finger @nas1 | egrep '(tom|dick|harry)'
Does this help at all?
Merry Xmas.
> --
>
> Regards,
> -*Sue*-
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
--
"there's a long-standing bug relating to the x86 architecture
that allows you to install Windows too"
-Matthew D. Fuller
________________________________________________________________
FreeBSD - The Power To Serve http://www.freebsd.org
My Webpage http://ukug.uk.freebsd.org/~mark/
mailto:mark@ukug.uk.freebsd.org http://www.radan.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991226154822.C327>
