Re: backward-kill-word is not refreshing correctly

2009-04-10 Thread Jay Freeman (saurik)
> > When I type a long string of text and start pressing ctrl-W to > > backwards-kill words, bash deletes the words but doesn't visually refresh > > (the words still appear on the command line). This was not occurring for me > > in the 3.x series of Bash. > I having a problem similar to this. F

Re: backward-kill-word is not refreshing correctly

2009-04-10 Thread Jay Freeman (saurik)
On Mar 18, 6:55 pm, m...@ice.filescope.com, zy...@ice.filescope.com wrote: ... >         When I type a long string of text and start pressing ctrl-W to > backwards-kill words, bash deletes the words but doesn't visually refresh > (the words still appear on the command line). This was not occurrin

Re: (set -u -e; trap true EXIT; echo $bad) exits 0

2009-04-10 Thread Chet Ramey
Piotr Zielinski wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i486 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCALEDI

Re: possible bash 4.0.10 bug: command substitution in PROMPT_COMMAND

2009-04-10 Thread Ian Kelling
Chet Ramey wrote: I cannot reproduce this using bash-4.0.10 or bash-4.0.17 on Mac OS X, Ubuntu, RHEL 4, or FreeBSD. Chet I can't reproduce it either. - Ian Kelling

Re: possible bash 4.0.10 bug: command substitution in PROMPT_COMMAND

2009-04-10 Thread Chet Ramey
Jared Yanovich wrote: > Hi, I upgraded to bash 4.0.10 and my PS1 prompt is no longer displaying > anything at all. Here is a contrived .bashrc: > > .bashrc: > BEGIN > f() > { > $(:) > PS1='$ ' > } > PROMPT_COMMAND=f > END

Re: (set -u -e; trap true EXIT; echo $bad) exits 0

2009-04-10 Thread Freddy Vulto
Even within the EXIT trap, the -u error exit status disappears when -e is used (?): $ (set -u; trap 'echo $?' EXIT; echo $bad) bash: bad: unbound variable 1 $ (set -eu; trap 'echo $?' EXIT; echo $bad) bash: bad: unbound variable 0 Freddy Vulto http://fvue.nl

Re: UDP client programming

2009-04-10 Thread Mike Frysinger
On Friday 10 April 2009 08:06:17 Henri Moreau wrote: > My script sends a UDP query to a server and gets a response datagram. All > packets are character strings and I have had trouble reading the response. > A method that I have found to work is to arrange for the response packet to > have a uniqu

Re: possible bash 4.0.10 bug: command substitution in PROMPT_COMMAND

2009-04-10 Thread Greg Wooledge
On Thu, Apr 09, 2009 at 05:12:13PM -0400, Jared Yanovich wrote: > Specifically, I use this output of a command in my prompt (sorry to > offend anyone who finds that ridiculous), so it would be nice to have > the old functionality back if possible. You can do: PS1='$(your command) other stuff her

Re: possible bash 4.0.10 bug: command substitution in PROMPT_COMMAND

2009-04-10 Thread Ian Kelling
Jared Yanovich wrote: Hi, I upgraded to bash 4.0.10 and my PS1 prompt is no longer displaying anything at all. I think this was addressed in a recent patch. Try upgrading to the most recent version. - Ian Kelling

UDP client programming

2009-04-10 Thread Henri Moreau
My script sends a UDP query to a server and gets a response datagram. All packets are character strings and I have had trouble reading the response. A method that I have found to work is to arrange for the response packet to have a unique terminating character ('\0') and to pipe the response into

Re: how to pass arguments with space inside?

2009-04-10 Thread Mart Frauenlob
Stephane CHAZELAS wrote: 2009-04-09, 23:18(+02), Mart Frauenlob: [...] I wonder where's the bug report? You seem to miss that the support place for bash is 'gnu.bash' not 'gnu.bash.bug'. [...] Interesting, I can see that Google groups has a gnu.bash newsgroup with messages that date back as f

Re: how to pass arguments with space inside?

2009-04-10 Thread Mart Frauenlob
lehe wrote: Hi, I was wondering how to pass arguments with space inside. For example, my bash script looks like: #!/bin/bash ARG_OPTS="" while [[ -n "$1" ]]; ARG_OPTS="${ARG_OPTS} $1" shift done If I pass an argument like "--options='-t 0 -v 0'", then it would be splitted by the spa

possible bash 4.0.10 bug: command substitution in PROMPT_COMMAND

2009-04-10 Thread Jared Yanovich
Hi, I upgraded to bash 4.0.10 and my PS1 prompt is no longer displaying anything at all. Here is a contrived .bashrc: .bashrc: BEGIN f() { $(:) PS1='$ ' } PROMPT_COMMAND=f END However, it works if I take the command s

(set -u -e; trap true EXIT; echo $bad) exits 0

2009-04-10 Thread Piotr Zielinski
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash

bash spell check

2009-04-10 Thread spursfan
I am producing a program in bash which analyses a mailbox (.mbx) file. One of the outputs which i want it to be able to complete is to count how many times specified words appear in the file, however they are spelt. i.e spelling mistakes or other symbols used to replace letter, for e.g @ or 4 inst

Re: how to pass arguments with space inside?

2009-04-10 Thread Eric Blake
Greg Wooledge eeg.ccf.org> writes: > > On Fri, Apr 10, 2009 at 12:02:56AM -0700, lehe wrote: > > The reason why I don't use "$@" is that the arguments to the bash script is > > not completely those for the executable. Some of them are just arguments > > only to the bash script. So actually the s

Re: how to pass arguments with space inside?

2009-04-10 Thread Greg Wooledge
On Fri, Apr 10, 2009 at 12:02:56AM -0700, lehe wrote: > The reason why I don't use "$@" is that the arguments to the bash script is > not completely those for the executable. Some of them are just arguments > only to the bash script. So actually the script is like So you need to build up an *array

Re: how to pass arguments with space inside?

2009-04-10 Thread Stephane CHAZELAS
2009-04-09, 23:18(+02), Mart Frauenlob: [...] > I wonder where's the bug report? > You seem to miss that the support place for bash is 'gnu.bash' not > 'gnu.bash.bug'. [...] Interesting, I can see that Google groups has a gnu.bash newsgroup with messages that date back as far as 1999 newsgroup. I

Re: how to pass arguments with space inside?

2009-04-10 Thread lehe
The reason why I don't use "$@" is that the arguments to the bash script is not completely those for the executable. Some of them are just arguments only to the bash script. So actually the script is like [code] #!/bin/bash DEBUGGER="" ARG_OPTS="" while [[ -n "$1" ]]; case $1 in