From: Giulio Orsero <firstname.lastname@example.org> Newsgroups: comp.unix.sco.misc Subject: Re: Problem w/ echo Date: Sun, 31 Dec 2000 11:10:57 +0100 Message-ID: <92n0nm$7loj9$1@ID-59665.news.dfncis.de> References: <email@example.com>
<3A4E59F7.EAEC7458@squonk.net> "Brian K. White" <firstname.lastname@example.org> ha scritto: >> 2) under bash-2.x >> just add in /etc/profile >> shopt -s xpg_echo >> and you should be set
>Just tried this with the bash 2.03 from skunkware for sco osr5 >when used with an account that has bash as the login shell >all I get is: > bash: shopt: xpg_echo: unknown shell option name I looked at the bash CHANGES file and the option I suggested is there starting in 2.04 (used in RedHat7.x) With previous versions you have to configure bash with --enable-usg-echo-default (that now is --enable-xpg-echo-default) at build time, that is something similar to bash-1.x. with bash-2.04: $ cat file1 echo "hi\n" $ ./file1 hi\n $ echo "hi\n" hi\n $ shopt -s xpg_echo $ ./file1 hi $ echo "hi\n" hi $ >convenient if I could use bash on osr5 without it breaking all the system >scripts that don't have any #!/bin/sh at the top If you use bash2 there should be no problem (using scripts without anything at the top), but if you ever should use bash-1.x (RedHat6.x and others), then see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=4768 For that reason we had to add "#!/bin/sh" at the top of every script; this allowed us to keep using scripts developed on other unix systems both on those systems and on linux (where sh is linked to bash). I said that with bash-1.x you need to use a compile time option; actually, reading the bash man page one may think he can make it work runtime (without editing scripts) using an alias and setting $BASH_ENV appropriately; unfortunately, I tried hard for many days to make it work without success, so that I rebuilded the rpm and never thought of it again. -- email@example.com
Got something to add? Send me email.