Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 1999 01:47:16 +1100
From:      aunty <aunty@comcen.com.au>
To:        freebsd-questions@freebsd.org
Subject:   shell quoting problem?
Message-ID:  <19991227014716.D17780@comcen.com.au>

index | next in thread | raw e-mail

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?

-- 

Regards,
        -*Sue*-
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991227014716.D17780>