[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff: suboptimal behaviour with errors
From: |
Thomas Schwinge |
Subject: |
diff: suboptimal behaviour with errors |
Date: |
Thu, 18 Mar 2004 17:52:53 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello!
Please have a look at the following:
#v+
address@hidden:~/tmp > dd if=/dev/urandom of=1 count=7 ; dd if=/dev/urandom
of=2 count=7
7+0 records in
7+0 records out
7+0 records in
7+0 records out
address@hidden:~/tmp > diff -u 1 2 ; echo $?
Binary files 1 and 2 differ
2
address@hidden:~/tmp > diff -u 1 nonexistent ; echo $?
diff: nonexistent: No such file or directory
2
address@hidden:~/tmp > diff -qwertz ; echo $?
diff: invalid option -- z
diff: Try `diff --help' for more information.
2
#v-
For the first run of 'diff' I can understand that it won't return '1' as
it has not been able to provide a "diff".
But I can not understand that running it against nonexistent files or
with unrecognised options will make it exit with the same return value
as above; these are totally different things.
IMHO all these three should have different return values.
Could / should this be changed in a later version of diff?
Regards,
Thomas
- diff: suboptimal behaviour with errors,
Thomas Schwinge <=
- Re: diff: suboptimal behaviour with errors, Paul Eggert, 2004/03/18
- Re: diff: suboptimal behaviour with errors, Thomas Schwinge, 2004/03/19
- Re: diff: suboptimal behaviour with errors, Thomas Schwinge, 2004/03/26
- Re: diff: suboptimal behaviour with errors, Paul Eggert, 2004/03/27
- Re: diff: suboptimal behaviour with errors, Thomas Schwinge, 2004/03/27
- Re: diff: suboptimal behaviour with errors, Paul Eggert, 2004/03/27