Re: PS1 has ruined line wrap

2011-02-12 Thread Jonathan Reed
An old thread but I found a way around this by adding a line to my bashrc: echo -ne "\033]0; `whoami` @ `hostname` \007" The reference http://mdinh.wordpress.com/2010/11/21/xterm-title-bar/ On Thu, Nov 25, 2010 at 7:26 PM, Chet Ramey wrote: > On 11/25/10 3:38 PM, Jonathan Reed wrote: > > I was

Re: leading 0 inconsistence?

2011-02-12 Thread Maarten Billemont
On 12 Feb 2011, at 11:57, Ralf Goertz wrote: > > Hi, > > I am wondering what the reasoning might be for this seeming > inconsistence. > >> i=08 >> if [ $i -lt 9 ] ; then echo ok; fi > ok >> if [ $((i)) -lt 9 ] ; then echo ok; fi > bash: 08: value too great for base (error token is "08") > > Why

Re: Can someone explain this?

2011-02-12 Thread Maarten Billemont
On 12 Feb 2011, at 09:28, Andreas Schwab wrote: > > Bob Proulx writes: > >> Dennis Williamson wrote: >>> Yes, do your quoting like this: >>> ssh localhost 'bash -c "cd /tmp; pwd"' >> >> I am a big fan of piping the script to the remote shell. >> >> $ echo "cd /tmp && pwd" | ssh example.com ba

Corrupt prompt string using '\W' within PS1

2011-02-12 Thread Thomas Kuschel
From: oe6...@gmx.at To: bug-bash@gnu.org Subject: Corrupt prompt string using '\W' within PS1 Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -

Re: leading 0 inconsistence?

2011-02-12 Thread Andreas Schwab
Ralf Goertz writes: > Why is 08 not tried to be interpreted as octal when *numerically* compared > using test? Because test does not know about octal for compatibility. Use [[ ... ]] if you want to be closer to $((...)). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint =

leading 0 inconsistence?

2011-02-12 Thread Ralf Goertz
Hi, I am wondering what the reasoning might be for this seeming inconsistence. > i=08 > if [ $i -lt 9 ] ; then echo ok; fi ok > if [ $((i)) -lt 9 ] ; then echo ok; fi bash: 08: value too great for base (error token is "08") Why is 08 not tried to be interpreted as octal when *numerically* compar

Re: Can someone explain this?

2011-02-12 Thread Andreas Schwab
Bob Proulx writes: > Dennis Williamson wrote: >> Yes, do your quoting like this: >> ssh localhost 'bash -c "cd /tmp; pwd"' > > I am a big fan of piping the script to the remote shell. > > $ echo "cd /tmp && pwd" | ssh example.com bash > /tmp Even better: $ ssh example.com bash <<\EOF cd /tm