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


_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile

Reply via email to