On Mon, Oct 19, 2009 at 10:34 AM, Gene Heskett <gene.hesk...@verizon.net> wrote:
> I'll try that, but IIRC if the dir is empty, ls still returns a linefeed.
> brb.
> Nope, tried with !='' and !='\n', with almost the same result, the diff being
> that now the error message on the console is minus the ending ] now.
>
> ./flush.sh: line 173: [20091019011512: command not found

The whitespace is significant in the command I showed:

if [ `/bin/ls /dumps` != "" ]

btw, the shell strips leading and trailing whitespace, so don't worry
about the newline.

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com

Reply via email to