Re: Bash Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-04-07 at 12:28 +0100, Dan Track wrote:
> On 4/7/06, Paul Howarth <paul@xxxxxxxxxxxx> 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
> >
> 
> Hi
> 
> When I do 'man bash' I can't find any instance of -z, any ideas where
> it came from?
> 
-z is one of the options to test
man test
[] is an alias for test


> Dan
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux