Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 1995 21:18:22 +0100 (MET)
From:      guido@gvr.win.tue.nl (Guido van Rooij)
To:        current@FreeBSD.org
Subject:   broken sh behaviour
Message-ID:  <199502262018.VAA01165@gvr.win.tue.nl>

next in thread | raw e-mail | index | archive | help
I'd like you comment on what I think is broken in our sh:
When a variable is set like:
a=`command`
all shells I know of, strip of trailing new-lines.
Our shells doesnt which breaks Pnews (at least at our site). Reason:
a sed script is evaluated and gives only empty lines to a var called
moderator. This var is then checked to be empty. this check fails.

I have a patch ready for this, but I'm not going to commit it when
ppl dont agree on this.

-Guido.

Please include me in the Cc: list, as I'm not on current


So, to summarize:
On a Sun, we see:
Script started, file is typescript
guido@wzv[1] cat a




guido@wzv[2] cat sh
m=`cat a`
guido@wzv[3] sh -x sh
+ cat a
m=
guido@wzv[4] exit
Script done, file is typescript

And on FreeBSD, we see:
Script started, file is typescript
guido@gvr[101] cat a






guido@gvr[102] cat sh
m=`cat a`
guido@gvr[103] sh -x sh
+ cat a
+ m=





guido@gvr[104]
Script done, file is typescript



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502262018.VAA01165>