[news.software.b] C News patch: Adapt to bash 1.04

chip@tct.uucp (Chip Salzenberg) (02/06/90)

The patch below adapts for a bug in Bash 1.04.  Normally, shell
variable expansion should take place before scanning for syntax
elements such as "0<&1".  Unfortunately, Bash 1.04 does things in the
wrong order.  This patch makes the "anne.jones" script work anyway.

*** ../sh-orig/anne.jones	Fri Jan 26 09:22:27 1990
--- anne.jones	Mon Feb  5 13:52:50 1990
***************
*** 42,46 ****
  		if test -t $fd; then
  			case "$USER" in
! 			"")	USER="`who am i <&$fd |
  				    sed -e 's/[	 ].*//' -e '/!/s/^.*!//' `" ;;
  			esac
--- 42,46 ----
  		if test -t $fd; then
  			case "$USER" in
! 			"")	USER="`eval \"who am i <&$fd\" |
  				    sed -e 's/[	 ].*//' -e '/!/s/^.*!//' `" ;;
  			esac
-- 
Chip Salzenberg at ComDev/TCT   <chip%tct@ateng.com>, <uunet!ateng!tct!chip>
          "The Usenet, in a very real sense, does not exist."