Bash Help

Dan Track dan.track at gmail.com
Fri Apr 7 11:28:54 UTC 2006


On 4/7/06, Paul Howarth <paul at city-fan.org> wrote:
> Dan Track wrote:
> > Hi
> >
> > Simple question, I'm running a command `command`, what I'd like to do
> > is check to see if the response is empty then exit. Does anyone know
> > how I can perform that check?
>
> Exit if "command" produces no output:
> [ -z "$(command)" ] && exit
>
> Paul.

Hi

Oooops. Just found it :)

Thanks
Dan




More information about the fedora-list mailing list