🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #197

Problem with test -n (core dumps)

#197
From: John Franks
Date: Sun, 02 Jul 1989 20:28
18 lines
1184 bytes
The following program core dumps.  I think it should  give  the  error
message  "test:  argument  expected." If $Y is quoted as it should be,
then the program runs but the -n option has the opposite behavior from
what  is  described  in  the  help file.  The -z option has the effect
which the help file attributes to the -n option.  The -n option  seems
to  have  no  function  (i.e.   "test  -n STRING" is the same as "test
STRING" ).  If this is true it could be removed.  

#bash version 1.01; run on Sun3, SunOS 4.03
Y=
if  test  -n $Y ; then echo "Ok"; fi



John Franks 	Dept of Math. Northwestern University
		Internet	john@math.nwu.edu
		Bitnet		j_franks@nuacc
Technical Details
Message-ID: <816@accuvax.nwu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!ames!rex!uflorida!ukma!husc6!mailrus!shadooby!accuvax.nwu.edu!hopf.math.nwu.edu!john

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!ames!rex!uflorida!ukma!husc6!mailrus!shadooby!accuvax.nwu.edu!hopf.math.nwu.edu!john
From: john@hopf.math.nwu.edu (John Franks)
Newsgroups: gnu.bash.bug
Subject: Problem with test -n (core dumps)
Keywords: test
Message-ID: <816@accuvax.nwu.edu>
Date: 2 Jul 89 20:28:20 GMT
Sender: news@accuvax.nwu.edu
Reply-To: john@hopf.math.nwu.edu (John Franks)
Distribution: gnu
Organization: Northwestern Univ. Evanston, Il.
Lines: 18