Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Jan Schampera
Mike Frysinger wrote: On Wednesday, August 25, 2010 00:59:58 Jan Schampera wrote: Mike Frysinger wrote: the difference here being the value in variable "a" after function "f" finishes executing. i was expecting the behavior of `bash`, not of `sh`. i cant seem to find anything covering this in

Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Mike Frysinger
On Wednesday, August 25, 2010 00:59:58 Jan Schampera wrote: > Mike Frysinger wrote: > > the difference here being the value in variable "a" after function "f" > > finishes executing. i was expecting the behavior of `bash`, not of `sh`. > > i cant seem to find anything covering this in the man pag

Re: discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Jan Schampera
Mike Frysinger wrote: the difference here being the value in variable "a" after function "f" finishes executing. i was expecting the behavior of `bash`, not of `sh`. i cant seem to find anything covering this in the man page except for perhaps interpreting the meaning of some sections to mea

discrepancy with variable assignments and simple commands between sh and bash

2010-08-24 Thread Mike Frysinger
i'm finding that the `var=val cmd` syntax isnt working the same between `sh` and `bash` when the simple command is a function. this is bash-4.1_p7, but testing some older ones seems to behave the same. i'm not sure if this is "by design" or a bug ... simple example: $ cat test.sh unset a a=a

Re: File name/Line numbers with tracing output.

2010-08-24 Thread Edward Peschko
Eric, Cool, I had used bashdb before, didn't know it could trace.. Anyways, thanks, I'll try it out. Ed On 8/24/10 6:12 AM, "Eric Blake" wrote: On 08/23/2010 08:27 PM, Edward Peschko wrote: > All, > > I've been working lately at upgrading my debugging tools and procedures, and > have come t

Re: File name/Line numbers with tracing output.

2010-08-24 Thread Dennis Williamson
On Tue, Aug 24, 2010 at 2:44 AM, Joachim Schmitz wrote: > Edward Peschko wrote: >> >> All, >> >> I've been working lately at upgrading my debugging tools and >> procedures, and have come to looking how I can improve debugging >> bash. >> I know about bash -x , but its terribly annoying because, ev

Re: edit-and-execute-command; minus the "execute" part?

2010-08-24 Thread Dennis Williamson
One workaround would be to bind the keystroke to a macro that inserts a comment character at the beginning of the line before doing edit-and-execute-command. Then when you exit the editor the comment will be "executed" then you can press up arrow to retrieve the line and delete the comment characte

Re: login shell crash on Mac OS X while closing file descriptors

2010-08-24 Thread Chet Ramey
On 8/22/10 10:13 PM, Rainer Müller wrote: > Bash Version: 4.1 > Patch Level: 7 > Release Status: release > > > > I cannot reproduce this very good, but it happens for me now with > iTerm.app and '/opt/local/bin/bash -l' as command. A crash report is > attached to this message. > > The importan

Re: File name/Line numbers with tracing output.

2010-08-24 Thread Eric Blake
On 08/23/2010 08:27 PM, Edward Peschko wrote: All, I've been working lately at upgrading my debugging tools and procedures, and have come to looking how I can improve debugging bash. Have you tried the bashdb package? It takes full advantage of a wide variety of bash features to make it pos

Re: Bash style of if-then-else?

2010-08-24 Thread Joachim Schmitz
Pierre Gaston wrote: On Tue, Aug 24, 2010 at 10:25 AM, Joachim Schmitz wrote: Chris F.A. Johnson wrote: On Mon, 23 Aug 2010, Dennis Williamson wrote: If you're writing a Bash-specific script then it's preferable to use double square brackets (see http://mywiki.wooledge.org/BashFAQ/031). if

Re: File name/Line numbers with tracing output.

2010-08-24 Thread Joachim Schmitz
Edward Peschko wrote: All, I've been working lately at upgrading my debugging tools and procedures, and have come to looking how I can improve debugging bash. I know about bash -x , but its terribly annoying because, even though it shows the evaluated text, there is no explicit way to tie th

Re: Bash style of if-then-else?

2010-08-24 Thread Pierre Gaston
On Tue, Aug 24, 2010 at 10:25 AM, Joachim Schmitz wrote: > Chris F.A. Johnson wrote: >> >> On Mon, 23 Aug 2010, Dennis Williamson wrote: >> >>> If you're writing a Bash-specific script then it's preferable to use >>> double square brackets (see http://mywiki.wooledge.org/BashFAQ/031). >>> >>> if [

File name/Line numbers with tracing output.

2010-08-24 Thread Edward Peschko
All, I've been working lately at upgrading my debugging tools and procedures, and have come to looking how I can improve debugging bash. I know about bash -x , but its terribly annoying because, even though it shows the evaluated text, there is no explicit way to tie that output back to the sc

Re: Bash style of if-then-else?

2010-08-24 Thread Joachim Schmitz
Chris F.A. Johnson wrote: On Mon, 23 Aug 2010, Dennis Williamson wrote: If you're writing a Bash-specific script then it's preferable to use double square brackets (see http://mywiki.wooledge.org/BashFAQ/031). if [[ -f $file ]] then do something fi I'd avoid non-portable syntax unless