Re: RH9 breaks bash ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In regard to: RH9 breaks bash ?, Perry Hutchison said (at 11:50am on Dec...:

>   MY_HN=`hostname | sed -e 's/\..*//' `
>   MY_TITLES="\0033]2;$MY_HN\0007\0033]1;$MY_HN\0007"
>   /bin/echo "${MY_TITLES}\c"
>
>which used to set the xterm window and icon titles, now just echos
>the uninterpreted string:
>
>    \0033]2;cricket\0007\0033]1;cricket\0007\c

It's probably the echo, not the other stuff.  When I run your commands on
a Solaris box, with bash 2.05b, and do

	echo "${MY_TITLES}\c"

I get the backslashed output.  If I instead run

	builtin echo -e "${MY_TITLES}\c"

I get your expected result.

>The difference is not in xterm, because the titles do get set correctly
>when I rlogin to an older system from an RH9 xterm.
>
>How can I restore the previous behavior?  Changing the .bashrc is
>probably not a viable approach, because it still needs to work on
>a variety of systems, some of which have older versions of bash.

Well, changing your personal .bashrc seems like a more viable approach
than trying to change the system shell.  Why not detect what platform
and version of bash you have, and then customize how bash acts and
what options you give it based on what you've detected?

Look at $BASH_VERSION, $HOSTTYPE, $OSTYPE, and other variables that bash
sets for you, and customize your .bashrc based on those.

Tim
-- 
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux