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

Re: Bash Help



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.


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