bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem Bug in shell builtin" test -f" or "test -e"


From: Kess Peter
Subject: Problem Bug in shell builtin" test -f" or "test -e"
Date: Tue, 7 Oct 2003 14:25:41 +0200

Hello,

i have a customer where i migrate a large database from unixware to
linux( suse open enterprise 8) but it also happens in Suse 7.3 Professional.
Our customer uses "test -f" whithin thousands of scripts.

But if i use "test -f    " with no additional parameter it comes back with
exit status 0.
And I think this is not ok.

Here are some shell examples:

pknblx:/tmp # test -f
pknblx:/tmp # echo $?
0
##################################
pknblx:/tmp # test -f ANYFILE
pknblx:/tmp # echo $?
1

The same command on Sco Unixware 7.1.1:
# test -f
UX:test: FEHLER: Argument erwartet
# echo $?
1
#####################################

I have made a workaround with a shellscript "test" but I think this is not
performant.

Is there a solution?
Best regards

Peter Kess

Carl Schasiepen GmbH
Willettstr. 11
40822 Mettmann
Germany

Tel.  : +49 (2104) 494 - 231
Fax. : +49 (2104) 494 - 331

E-Mail       : mailto:address@hidden
oder
E-Mail2     : mailto:address@hidden

Internet     :  <http://www.schasiepen.de>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]