On Fri, Feb 13, 2004 at 12:27:23PM -0500, Allen Liu --- work wrote:
> I am not sure if this is an error in amverifyrun script.
>
> I run amverifyrun and got a error :
>
> test: argument expected.
>
> When I viewed the script I found the 1st line is :
>
> #!/bin/sh
> while there is a test line in body :
> [ -e ...... ]
>
> This is not supported in sh. After I change 1st line to #!/bin/ksh,
> it works fine.
> Has anybody experienced this before ?
Likely authored by someone working on a system where /bin/sh is
not Bourne shell, but a posix compatible shell.
While not as comprehensive as the "does any type of file exist
by this name", -e option, the test could probably be replaced by:
[ -d ... -o -f ... ]
which only checks for directory or ordinary files. It doesn't
consider devices, sockets, named pipes, ... but those are
pretty uncommon where amanda is probably testing.
--
Jon H. LaBadie jon AT jgcomp DOT com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)
|