bug-bash
[Top][All Lists]
Advanced

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

Re: best way to test for empty dir?


From: Stephane CHAZELAS
Subject: Re: best way to test for empty dir?
Date: Sat, 12 Dec 2009 10:23:55 +0000 (UTC)
User-agent: slrn/pre1.0.0-16 (Linux)

2009-12-12, 10:21(+00), Stephane CHAZELAS:
[...]
>> exists()
>> {
>>     [ -e "$1" -o -L "$1" ]
>> }
>
> $ exists =
> bash: [: too many arguments
>
> [ -e "$1" ] -o [ -L "$1" ]
[...]

Sorry, I meant

[ -e "$1" ] || [ -L "$1" ]

-- 
Stéphane


reply via email to

[Prev in Thread] Current Thread [Next in Thread]