Re: how to pass arguments with space inside?

2009-04-10 Thread lehe
=${ARG_OPTS} $1 ;; esac shift done ${DEBUGGER} my_executable ${ARG_OPTS} [/code] Chris F.A. Johnson-3 wrote: On Thu, 9 Apr 2009, lehe wrote: Sorry. I won't top post again. You just did! I tried your way but ARG_OPTS only accept the first argument

how to pass arguments with space inside?

2009-04-09 Thread lehe
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 spaces inside, ie

Re: how to pass arguments with space inside?

2009-04-09 Thread lehe
Thanks Mike. Could you explain it a little? I don't quite get it. How to apply this to argument parsing? Mike Frysinger wrote: On Thursday 09 April 2009 16:46:27 lehe wrote: I was wondering how to pass arguments with space inside. For example, my bash script looks like: #!/bin/bash

Re: how to pass arguments with space inside?

2009-04-09 Thread lehe
be passed successfully as argument. Hope that I could explain my question clearly enough. Really appreciate your advice! lehe wrote: Thanks Mike. Could you explain it a little? I don't quite get it. How to apply this to argument parsing? Mike Frysinger wrote: On Thursday 09 April 2009 16

Re: how to pass arguments with space inside?

2009-04-09 Thread lehe
Forgot to say in the bash script, the call to the executable is like: my_executable ${ARG_OPTS} lehe wrote: Actually in the bash script there is a command that passes --options='-t 0 -v 0' as argument to an executable. I just found if I double quote --options='-t 0 -v 0' as argument

Re: how to pass arguments with space inside?

2009-04-09 Thread lehe
Sorry. I won't top post again. I tried your way but ARG_OPTS only accept the first argument and ignore the rest. Mike Frysinger wrote: On Thursday 09 April 2009 17:47:59 lehe wrote: Thanks Mike. please do not top post Mike Frysinger wrote: On Thursday 09 April 2009 16:46:27 lehe

Re: Install Bashdb and Bash not as root

2009-03-05 Thread lehe
only one work, either my office computer or my laptop. Bob Proulx wrote: lehe wrote: Since the old shell is the login shell reading ./bash_profile and the new one isn't but reading ./bashrc, how could there possibly be infinite loop at login-in? There shouldn't be, so you should be okay

cannot execute binary file

2009-03-05 Thread lehe
Hi, Lately I am trying to install a higher version of emacs under my ${HOME} on my office server. I add the new emacs path into PATH. It works quite well when I ssh to the server, but encounters this /home/emacs/bin/emacs: cannot execute binary file error when I am working on my office computer

Re: Install Bashdb and Bash not as root

2009-03-05 Thread lehe
Sorry, Bob, it's my bad. ${HOME} in my previous posts were not described consistently. Actually my $HOME on my office server is /cis/home/tingli. '/cis/home/tingli/bin/bash-3.2.48/bin/bin/bash' is actually where my new bash executable lies in the server (the double bins were left from my silly

Re: Install Bashdb and Bash not as root

2009-03-04 Thread lehe
it is lauched in terminal, putty and in emacs. Is there a place where the change to PATH could be added and executed before bash starts, like .bashrc for when bash is lauched? 2. Also in emacs, if I type M-x bashdb, bashdb is not matched. How shall I set it up? Thanks and regards! lehe wrote: Hi

Re: order of redirections

2009-03-03 Thread lehe
Got it. Thank you very much! -- View this message in context: http://www.nabble.com/order-of-redirections-tp22298397p22316124.html Sent from the Gnu - Bash mailing list archive at Nabble.com.

order of redirections

2009-03-02 Thread lehe
Hi, I have some questions about the paragraph in Bash Reference on redirections: Note that the order of redirections is significant. For example, the command ls dirlist 21 directs both standard output (file descriptor 1) and standard error (file descriptor 2) to the file dirlist, while the

restart debug in Bashdb with Emacs

2009-02-26 Thread lehe
Hi, I am using Bashdb in Emacs. Everytime when I reach Debugger finished at the end of the debugging, do I have to restart all over again from typing M-x bashdb if I'd like to debug again? Is it possible to save the typing? Thanks! -- View this message in context:

Re: bashdb question

2009-02-26 Thread lehe
get BASH_EXECUTION_STRING='set|grep -i dbg'. So I guess my bashdb is not set up properly? Thanks! Chet Ramey wrote: lehe wrote: Hi, I am beginning to use bashdb to debug my shell script. There is one problems here. With bash --debugger ./myscript.sh it will run to finish without stop

arguments to script prefixed with -- in debug

2009-02-26 Thread lehe
Hi, I am trying to debug my shell script by bashdb. My script take as argument --gdb, so I wrote bashdb myscript.sh --gdb However, this way it will produce error that bashdb: unrecognized option '--gdb' If I quote --gdb as bashdb myscript.sh '--gdb' then I will end up with the quotes