> To: [email protected]; [email protected]; > [email protected] > Subject: RE: [ast-users] [ksh93] How to understand `[ -n hello world ]'? > Date: Fri, 1 Jun 2012 11:30:43 -0400 > From: [email protected] > > > On Fri, 1 Jun 2012 17:00:38 +0200 Janis Papanagnou wrote: > > > On Fri=2C Jun 1=2C 2012 at 9:13 PM=2C Glenn Fowler > > > <[email protected]>= > > wrote: > > > > try this for a hint: > > > > [ hello ] && echo yes > > What is your expectation here=2C if you write such an expression=3B > > what (operational) semantics do you expect? > > after a few more tests my expectation was proved wrong My question had been put after the other posters expression >>> [ -n foo bar ] Whether actually defined in shell or not, I can at least think of semantics for expressions like [ hello ] or [ $hello ] or [ -n hello ] or [ -n $hello ] or [ "foo bar" ] or [ -n "foo bar" ] but I have problems with the semantics of the OP's contruct [ -n foo bar ] and what it should mean.
_______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
