Why is command substitution happening?

2011-04-12 Thread Bill Gradwohl
trying to understand why command substitution is happening at all, since the opening paren isn't preceded by a dollar sign. - -- Bill Gradwohl Roatan, Honduras 504 9 899 2652 IM:billgradw...@gmail.com (No email please-IM only) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GN

Re: Why is command substitution happening?

2011-04-12 Thread Bill Gradwohl
te to the first one? Doesn't make sense to me but I'm reaching for understanding. I'm trying to understand why a particular line has an error and not similar lines before it. - -- Bill Gradwohl Roatan, Honduras 504 9 899 2652 IM:billgradw...@gmail.com (No email ple

Re: Why is command substitution happening?

2011-04-12 Thread Bill Gradwohl
so this simple find won't work unless I run it as many times as there is depth to the hierarchy. BTW - Is there a better place to ask these questions about bash? I doubt this is a bug so asking here is probably inappropriate, but I don't know where else to ask. - -- Bill Gradwo

Time delay on command not found

2011-10-10 Thread Bill Gradwohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 when I typo a command, bash comes back with a command not found but hangs the terminal for way too long. How do I get rid of the delay. I want it to release the terminal immediately. - -- Bill Gradwohl Roatan, Honduras -BEGIN PGP SIGNATURE

Re: '>;' redirection operator

2011-12-24 Thread Bill Gradwohl
roduce a sub optimum product. Better perhaps than what is available now, but still not what it could be. The single largest failing in BASH, and in most of what's available open source, is the documentation. -- Bill Gradwohl

Re: '>;' redirection operator

2011-12-24 Thread Bill Gradwohl
of more bells and whistles, talent should be applied towards the documentation of what is already there. -- Bill Gradwohl

Re: Passing variables by reference conflicts with local

2012-04-26 Thread Bill Gradwohl
it created lives on in Main. The tail wagging the dog comes to mind. If there's another interpretation than the one I came up with, please correct me as much of this is guess work on my part. -- Bill Gradwohl

Re: Passing variables by reference conflicts with local

2012-04-26 Thread Bill Gradwohl
tuck with something in the global name space that via the hierarchy of calls, it doesn't properly own. I would never purposely write code that did that, and was surprised that bash allows it. -- Bill Gradwohl

Re: Compare 2 arrays.

2012-05-29 Thread Bill Gradwohl
lare -a yours=(10 20 30 40) declare -a mine=(10 21 30 40) compareForeignArrays yours mine && echo Equal || echo NOT Equal declare -a red=(1 2 3 4 5) declare -a blue=(1 2 3 4) compareForeignArrays red blue && echo Equal || echo NOT Equal declare -a night=(1 2 [7]=3 4 5) declare -a day=(1 2 [6]=3 4 5) compareForeignArrays night day && echo Equal || echo NOT Equal -- Bill Gradwohl

Re: Compare 2 arrays.

2012-05-30 Thread Bill Gradwohl
idden from the outside world and only accessible from within the containing function. I wish bash had lots of things it doesn't, and yet it does a fine job as a command interpreter. I have to find alternatives for what I want or need, but they are there. ...there are dark corners in the Bourn

Re: Compare 2 arrays.

2012-05-30 Thread Bill Gradwohl
lease should be at least as capable as the current one and since the current one provides access to a foreign array as I demonstrated, the next release should also. Hopefully well documented. Using the tool you have now and doing something is better than waiting and doing nothing in the interim. -- Bill Gradwohl

Re: Indirect access to variables, including arrays (was Re: Compare 2 arrays.)

2012-06-07 Thread Bill Gradwohl
e" ]] && return 0 done else set -- "$1" "${2:?}[@]" local _e for _e in "${!2}"; do [[ $1 == "$_e" ]] && return 0 done fi return 1 } array=(a b c abc d e f) _in abc array && echo Yes || echo No array=(a b c abxc d e f) _in abc array && echo Yes || echo No e=(a b c abc d e f) _in abc e && echo Yes || echo No e=(a b c abxc d e f) _in abc e && echo Yes || echo No -- Bill Gradwohl

cd // produces unexpected results

2012-06-22 Thread Bill Gradwohl
es as they're supposed to be the canonical path. -- Bill Gradwohl

Re: Question about the return value of 'local'

2012-12-14 Thread Bill Gradwohl
> manpage. The options are automatically generated and the descriptions > hardcoded to a central builtins.c file. (user-defined types are self- > documenting). > > Most shell manuals follow about the same overall format and obviously > borrow > from one another. Some paragraphs are word-for-word identical between Bash > and > multiple other manuals. Best bet is to learn to navigate it quickly. > > -- > Dan Douglas > > -- Bill Gradwohl

Re: Question about the return value of 'local'

2012-12-14 Thread Bill Gradwohl
My point was to DESIGN for html and the rich environment it offers, not to try to convert a Model T into a Mercedes. I'm not wild about a wiki either, if its a free for all. If on the other hand, it is a submission platform that gets reviewed and edited by the developers then it's possibly of bene

Syntax for tab character

2009-04-24 Thread Bill Gradwohl
e visible '\t' in it. Is there a way to say it that is syntactically correct? [ \t] # doesn't work [ '\t']# doesn't work I've even tried assigning as follows: spaceTab=' \t' [${spaceTab}] # doesn't work -- Bill Gradwohl signature.asc Description: This is a digitally signed message part

indirection as an lvalue

2009-04-24 Thread Bill Gradwohl
bug-bash/2002-11/msg00085.html I did a man bash looking for addr...@hidden thinking its some new facility I was unaware of. Made me feel pretty silly afterwards 8-) What is that supposed to be? The references presented by the search were largely unusable because of it. -- Bill Gradwohl signature.asc Description: This is a digitally signed message part

Re: Syntax for tab character

2009-04-24 Thread Bill Gradwohl
tried all the variations except that one. Thanks again. -- Bill Gradwohl signature.asc Description: This is a digitally signed message part

Re: Syntax for tab character

2009-04-24 Thread Bill Gradwohl
e [] is being used up but not in any way I expected. Clearly, $'\t' is not representing a tab character, nor is it just using the $ as a character in its own right. What is it doing? -- Bill Gradwohl xxx Description: application/shellscript signature.asc Description: This is a digitally signed message part

Re: indirection as an lvalue

2009-04-24 Thread Bill Gradwohl
tried it with and without and it doesn't appear to make a difference. You must have something up your sleeve by using it. -- Bill Gradwohl signature.asc Description: This is a digitally signed message part

Re: Syntax for tab character

2009-04-25 Thread Bill Gradwohl
000 68 65 6c 6c 6f 61 6e 64 ^ 67 6f 6f 64 62 79 65 2e h e l l o a n d ^ g o o d b y e . 010 0a ^ \n ^ Via man bash, the description for [...] us

Re: Syntax for tab character

2009-04-25 Thread Bill Gradwohl
ts, so printf or echo -e appears not to be an issue. Please run the script and see for yourself. -- Bill Gradwohl yyy Description: application/shellscript signature.asc Description: This is a digitally signed message part

Re: Syntax for tab character

2009-04-25 Thread Bill Gradwohl
On Sat, 2009-04-25 at 15:22 +0200, Andreas Schwab wrote: > You *still* use echo -e! And I also used printf as you suggested, and they both produce the same output. What's the problem? -- Bill Gradwohl signature.asc Description: This is a digitally signed message part

Re: Syntax for tab character

2009-04-25 Thread Bill Gradwohl
it dutifully expands \t to tab. > > All of your conclusions result from a faulty premise. > I now see what you are driving at. One error I made in specifying the string was reinforced by another error I made in using echo -e. I would never have figured that out without your help. Thank Yo