Hallo Matěj,
I did not read your script but I want to answer your shell question:
On Tue, Sep 25, 2001 at 11:15:32AM -0400, Matěj Cepl wrote:
> > [...mail archival script...]
> I have divided script into two, because I was not able to debugg
> your find command. However, I have now problem with bash.
> Consider following screenshot:
>
> mail $ test -f ./sluzebni/; echo $?
testing if an ordinary file ./sluzebni/ exists
> 1
no.
> mail $ test -d ./sluzebni/; echo $?
testing if ./sluzebni/ is a directory.
> 0
yes.
> mail $ ll
> total 332
> -rw-rw-r-- 1 matej matej 0 kvě 3 19:30 drafts
> drwxrwxr-x 2 matej matej 4096 zář 9 15:54 list
> drwxrwxr-x 2 matej matej 4096 zář 25 10:26 pratele
> -rw-rw-r-- 1 matej matej 270658 kvě 2 06:03 sent-200104
> -rw-rw-r-- 1 matej matej 45374 kvě 3 20:58 sent-200105
> drwxrwxr-x 2 matej matej 4096 zář 25 10:48 sluzebni
>
> If understand my bash manpage well, the second command should
> produce 1 too. Have you any idea why it doesn't? I am using bash
> 2.04.11(1)-release on RedHat GNU/Linux 7.0.
two things, very general in unix:
in the shell a return code 0 means "OK, no errors, true"
in opposite to most programming and scripting languages where
0 is associated with false and values different from 0 with true.
what test (a shell builtin for bash) does, I wrote above.
ask your shell: help test
to get a full list of it's behaviour.
Olaf
extra for you switched my font to iso8859-2