Re: Bash Help

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

 



On Fri, 2006-04-07 at 13:43 +0200, Alain PORTAL wrote:
> Le Vendredi 7 Avril 2006 13:08, Dan Track a écrit :
> > 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?
> 
> echo $?
This usually gives a success/failure result but does not give any hint
of the actual returned value.  Dan wanted to test for an empty response.

Another way to tell if the return is empty would be a simple test.
 [ "X`command`" == "X" ]  would return a true if the result of `command`
were empty (no value or the empty string).


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

  Powered by Linux