Date: Wed, 10 May 2000 12:20:08 -0400 (EDT) From: Matthew Emmerton <matt@skippyii.compar.com> To: keramida@ceid.upatras.gr Cc: freebsd-questions@freebsd.org Subject: Re: Problem with pipes and ps Message-ID: <Pine.BSF.4.10.10005101219190.59323-100000@skippyii.compar.com> In-Reply-To: <20000510144144.19510.qmail@zenon.ceid.upatras.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 May 2000 keramida@ceid.upatras.gr wrote: > On Wed, May 10, 2000 at 09:51:41AM -0400, Matthew Emmerton wrote: > > > > I've got this shell program (part of a home-made sysadmin package): > > > > #!/bin/sh > > PING_PROG="/bin/ps -ax | /usr/bin/grep apache" > > ${PING_PROG} > > > > My thought is that this should run the command(s) contained in PING_PROG. > > However, this is the output I get: > > Try using this: > > #!/bin/sh > PING_PROG="ps -ax | grep apache" > eval "${PING_PROG}" > > Then the commands that result from the expansion of PING_PROG will > be executed by your shell. > > - giorgos keramidas Of course! I feel *so* stupid. It works, I'm happy, and forever indebted :) -- Matthew Emmerton IT Specialist Computer Partners 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?Pine.BSF.4.10.10005101219190.59323-100000>