GNU bug report logs - #10390
Bug with Test Command

Previous Next

Package: coreutils;

Reported by: "Mathi.C" <mathiazhaganc <at> gmail.com>

Date: Wed, 28 Dec 2011 09:00:03 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Mathi.C" <mathiazhaganc <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Bug with Test Command
Date: Wed, 28 Dec 2011 00:12:49 -0600
[Message part 1 (text/plain, inline)]
Hi,

I have come across a scenario where test command resulted wrong result than
expected.

Please follow the below steps to simulate the scenario.
1. Define a variable to blank/null
     export a=
2. Test the parameter with test command on file exists
     test -f $a
3. Echo the result of the last executed command
    echo $?

Result we get is "0" -success, whereas the test command (step 2) should
error with parameter expected after " test -f".

-- 
Regards,
Mathi.C
[Message part 2 (text/html, inline)]

This bug report was last modified 13 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.