[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ./check-guile: test: argument expected
From: |
Alexander Klimov |
Subject: |
Re: ./check-guile: test: argument expected |
Date: |
Sun, 25 Mar 2001 14:06:17 +0000 (GMT) |
On 25 Mar 2001, Marius Vollmer wrote:
> > if [ ! -e guile-procedures.txt ]; then
> > ^^^
> > which produces the error message shown in subject. The line should be
> > substituted with
> > if [ ! -f guile-procedures.txt ]; then
>
> The problem with -f is that it checks for a regular file, while
> guile-procedures.txt will be a symlink when it exists. Would
>
> if [ ! -f guile-procedures.txt -a ! -h guile-procedures.txt ]; then
For me `-f' works perfectly well, consider sh session:
% mkdir ddd
% cd ddd
% test -f xxx && echo Yes
% :>aaa
% ln -s aaa xxx
% test -f xxx && echo Yes
Yes
Actully, documentation said that all commands follow simbolic links, so
`-f' means that after it resolve symbolic links it found `regular file'.
Is it the case that `-f xxx' fails if xxx is symbolic link to regular file
on some platform?
Regards,
ASK