From owner-freebsd-current Sun Feb 26 12:19:13 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id MAA02184 for current-outgoing; Sun, 26 Feb 1995 12:19:13 -0800 Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id MAA02174 for ; Sun, 26 Feb 1995 12:19:10 -0800 Received: by gvr.win.tue.nl (8.6.10/1.53) id VAA01165; Sun, 26 Feb 1995 21:18:23 +0100 From: guido@gvr.win.tue.nl (Guido van Rooij) Message-Id: <199502262018.VAA01165@gvr.win.tue.nl> Subject: broken sh behaviour To: current@FreeBSD.org Date: Sun, 26 Feb 1995 21:18:22 +0100 (MET) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 931 Sender: current-owner@FreeBSD.org Precedence: bulk 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