Re: Should this be this way?

2013-02-26 Thread Linda Walsh
Greg Wooledge wrote: POSIX specifies the behavior of a shell. This tells Chet how he has to make Bash behave (with some leeway). There are all kinds of silly little details and ambiguities that Chet has to worry about. However, YOU as a shell script writer do not have to worry about all

Should this be this way?

2013-02-25 Thread Linda Walsh
My login shell is /bin/bash (i.e. not /bin/sh); SHELL=/bin/bash as well. Typing 'which bash' gives /bin/bash, and whence bash: bash is /bin/bash. I had the foll0wing script which acts differently based on whether or not it has a #!/bin/bash at the top: (i.e., as it is displayed below, it fails;

Re: gnu parallel in the bash manual

2013-02-25 Thread Linda Walsh
Chet Ramey wrote: On 2/16/13 3:50 AM, Pierre Gaston wrote: I don't quite see the point of having gnu parallel discussed in the bash reference manual. I was asked to add that in May, 2010 by Ole Tange and Richard Stallman. Maybe now that it was done, it can be removed? Or did they ask

Re: Should this be this way?

2013-02-25 Thread Linda Walsh
DJ Mills wrote: On Mon, Feb 25, 2013 at 8:12 PM, Linda Walsh b...@tlinx.org mailto:b...@tlinx.org wrote: You didn't answer the question... how did you call the script? ''sh script'' ? --- I typed the script name interactively on the command line -- the way I thought most people ran

Re: gnu parallel in the bash manual

2013-02-25 Thread Linda Walsh
Chet Ramey wrote: On 2/25/13 8:07 PM, Linda Walsh wrote: Chet Ramey wrote: On 2/16/13 3:50 AM, Pierre Gaston wrote: I don't quite see the point of having gnu parallel discussed in the bash reference manual. I was asked to add that in May, 2010 by Ole Tange and Richard Stallman

Re: Should this be this way?

2013-02-25 Thread Linda Walsh
Chris Down wrote: On 2013-02-25 18:27, Linda Walsh wrote: I mentioned that everything in my ENV and usage pointed at /bin/bash. You gave $SHELL, which is not really relevant (it doesn't necessarily reference your login shell, or your current shell either). I also gave my

Re: Q on Bash's self-documented POSIX compliance...

2013-01-27 Thread Linda Walsh
Clark WANG wrote: I think every POSIX compatible shell has its own extensions so there's no guarantee that a script which works fine in shell A would still work in shell B even if both A and B are POSIX compatible unless the script writer only uses POSIX compatible features. Is there a

Q on Bash's self-documented POSIX compliance...

2013-01-26 Thread Linda Walsh
I noted on the bash man page that it says it will start in posix compliance mode when started as 'sh' (/bin/sh). What does that mean about bash extensions like arrays and use of [[]]? Those are currently not-POSIX (but due to both Bash and Ksh having them, some think that such features are

Re: | in bash?

2013-01-26 Thread Linda Walsh
Bob Proulx wrote: And therefore they don't know how to write other directory traversal tasks either. find . -type f -exec sed -n '/PATTERN/s/THIS/THAT/gp' {} + --- You mean I can't: sed -Rn '...' ? Drat. OB.bash: bash -c 'while (($#)); do [[ -f $1 ]] sed -n /PATTERN/s/THIS/THAT/gp

Re: How does one disable completion when nothing but tabs or spaces is on the line?

2013-01-05 Thread Linda Walsh
Chet Ramey wrote: OK, if readline as it currently exists doesn't offer the feature you want, why not take a shot at writing it? You might find that others like it as well, though none of them have spoken up so far. This feature used to exist in 3.0. You fixed it to only work

Re: How does one disable completion when nothing but tabs or spaces is on the line?

2013-01-05 Thread Linda Walsh
Chet Ramey wrote: On 1/5/13 8:36 PM, Linda Walsh wrote: Chet Ramey wrote: OK, if readline as it currently exists doesn't offer the feature you want, why not take a shot at writing it? You might find that others like it as well, though none of them have spoken up so far

Re: How does one disable completion when nothing but tabs or spaces is on the line?

2013-01-01 Thread Linda Walsh
Chet Ramey wrote: On 12/31/12 4:48 PM, Linda A. Walsh wrote: If I have nothing but tabs or spaces on a line, how do I disable completion but have it return the char typed? (space or tab) -- and if bash is looking for a command, then execute any command. If you don't want TAB to

Re: set -e (no || or )

2012-10-14 Thread Linda Walsh
Steven W. Orr wrote: On 10/12/12 06:55, quoth Sergey Fadeev: Why doesn't it exit the shell? $ set -e $ echo $(false) Shouldn't the error code of $(false) command substitution be checked by set -e before passing stdout to the echo builtin? Isn't it the most logical behavior that most

Re: a recursion bug

2012-10-02 Thread Linda Walsh
Chet Ramey wrote: On 9/28/12 9:54 AM, Yuxiang Cao wrote: I use ulimit -s to find stack size, which is 8192kbytes. Then I use valgrind to record the stack size which give me this information. test.sh: xmalloc: ../bash/unwind_prot.c:308: cannot allocate 172 bytes (8359936 bytes

Re: square bracket vs. curly brace character ranges

2012-10-02 Thread Linda Walsh
Chet Ramey wrote: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00086.html The above relies upon a hack to the algorithm -- use *USEFUL* hack in most cases, but still a hack. when I type locale I get: LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8

Re: a recursion bug

2012-10-02 Thread Linda Walsh
Greg Wooledge wrote: On Tue, Oct 02, 2012 at 10:01:43AM -0700, Linda Walsh wrote: On 9/28/12 9:54 AM, Yuxiang Cao wrote: test.sh: xmalloc: ../bash/unwind_prot.c:308: cannot allocate 172 bytes (8359936 bytes allocated) Why shouldn't bash fail at the point it hits resource exhaustion

Re: Unicode collation for readline completion in bash

2012-06-22 Thread Linda Walsh
Rob Hoelz wrote: Hello, I have an idea for a new feature for bash/readline, and I wanted to get the community's feedback before I go about implementing it. --- Have you looked at the Unicode collation algorithm? They have one published with each released. You say

Re: bash giving wrong message for indicated failure (was Re: Unhelpful behaviors in 4.2.10(1))

2012-06-14 Thread Linda Walsh
Chet Ramey wrote: That's fine -- if the error message points at the included file as not returning a 'true' value. It doesn't. It points to a conditional in the previous file. Note that the error message wasn't generated by bash: you generated it yourself based on $BASH_COMMAND and the

Re: bash giving wrong message for indicated failure (was Re: Unhelpful behaviors in 4.2.10(1))

2012-06-13 Thread Linda Walsh
: $ sdf Error executing [[ $# -ge 2 ]] in main - wrong statement at ./sdf, line 4 (level=0)- wrong file line # --- Linda Walsh wrote: Chet Ramey wrote: To be clear: `.' is a shell builtin, with its own

Re: Unhelpful behaviors in 4.2.10(1)

2012-06-09 Thread Linda Walsh
Pierre Gaston wrote: trap backtrace ERR set -T To sum up . sdf2 is returning 1 Bash considers . to be a simple command even though what's really executed is [[ $# -ge 2 ]] echo hello. --- Right It's NOT a simple command. I am trapping on ERR, not 'anything' that is

Re: Unhelpful behaviors in 4.2.10(1)

2012-06-09 Thread Linda Walsh
Chet Ramey wrote: On 6/9/12 3:05 AM, Linda Walsh wrote: To sum up . sdf2 is returning 1 Bash considers . to be a simple command even though what's really executed is [[ $# -ge 2 ]] echo hello. --- Right It's NOT a simple command. To be clear: `.' is a shell builtin, with its own

Re: req for fix: Completion: inconsistent case correction and '/' appending(for dirs)

2012-06-08 Thread Linda Walsh
Chet Ramey wrote: On 5/31/12 3:56 PM, Linda Walsh wrote: if I type in a path: (1st example) ls -d /share/doc/newtab, bash displays: ls /share/doc/New\ Folder Pressing 'Enter' gets: ls: cannot access /share/doc/New Folder: No such file or directory vs. (2nd example) ls /share/dotab ls

Unhelpful behaviors in 4.2.10(1)

2012-06-08 Thread Linda Walsh
File1: sdf: Ishtar:/tmp more sdf #!/bin/bash _prgpth=${0:?}; _prg=${_prgpth##*}; _prgdr=${_prgpth%/$_prg} [[ -z $_prgdr || $_prg == $_prgdr ]] $_prgdr=$PWD export PATH=$_prgdr/lib:$_prgdr:$PATH shopt -s expand_aliases extglob sourcepath ; set -o pipefail . backtrace.shh . sdf2

Re: Red-Hat Bug 825751 - bash-completion fails on environment variables

2012-06-07 Thread Linda Walsh
Clark WANG wrote: On Mon, May 28, 2012 at 11:32 PM, John E. Malmberg wb8...@qsl.net wrote: Actual results: ls \$HOME/ Already discussed for quite a few times. :) For example: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00079.html (patched attached)

Re: Red-Hat Bug 825751 - bash-completion fails on environment variables

2012-06-07 Thread Linda Walsh
Eric Blake wrote: On 06/07/2012 03:22 PM, Linda Walsh wrote: This isn't a matter of preference... its a real bug. Ex: $ ls $HOME/binTABRETURN ls: cannot access $HOME/bin: No such file or directory Yes, we know. Ergo patch 29: According to the the referred to discussion

Re: Incorrect mangling of multiline array assignment in history

2012-06-06 Thread Linda Walsh
Davide Brini wrote: Fix: No idea! Work-around: try setting shopt -s lithist

Re: .bashrc is sourced even for non-interactive shells (when run from sshd)

2012-06-03 Thread Linda Walsh
Pierre Gaston wrote: In all your examples the shell will be called like: bash -c 'isatty 0 2'. If you use a bash compiled with the above option you can add 'ps -p$$ -ocmd' at the top of your .bashrc to verify it. They are all non-interactive because they are called with -c, disregarding if

Re: .bashrc is sourced even for non-interactive shells (when run from sshd)

2012-06-02 Thread Linda Walsh
Pierre Gaston wrote: On Sat, Jun 2, 2012 at 8:24 PM, Mikel Ward mi...@mikelward.com wrote: On Sat, Jun 2, 2012 at 10:19 AM, Pierre Gaston pierre.gas...@gmail.com wrote: On Sat, Jun 2, 2012 at 8:15 PM, Mikel Ward mi...@mikelward.com wrote: bash sources .bashrc even for some non-interactive

req for fix: Completion: inconsistent case correction and '/' appending(for dirs)

2012-05-31 Thread Linda Walsh
if I type in a path: (1st example) ls -d /share/doc/newtab, bash displays: ls /share/doc/New\ Folder Pressing 'Enter' gets: ls: cannot access /share/doc/New Folder: No such file or directory vs. (2nd example) ls /share/dotab ls /share/Doc/ntab ls /share/Doc/New\ Folder/ (enter)

Re: Possible bug: Race condition when calling external commands during trap handling

2012-05-22 Thread Linda Walsh
Andreas Schwab wrote: A trap is not a signal. It doesn't come in. A trap handler is executed because some condition is true at a command boundary. Andreas. That still begs the question... If you are in your trap handler, and you don't reset the signal -- how can you guarantee that your

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Greg Wooledge wrote: On Sun, May 20, 2012 at 11:36:35AM -0700, Linda Walsh wrote: For instance, on HP-UX 10.20, in the en_US.iso88591 locale: A a ... B b Meanwhile, on Debian 6.0, in the en_US.iso88591 locale: a A ... b B As you can see, the two en_US.iso88591

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Greg Wooledge wrote: On Mon, May 21, 2012 at 12:19:26PM -0700, Linda Walsh wrote: Greg Wooledge wrote: For instance, on HP-UX 10.20, in the en_US.iso88591 locale: A a ... B b Meanwhile, on Debian 6.0, in the en_US.iso88591 locale: a A ... b B So which is correct? Both

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Aharon Robbins wrote: You'd think unicode would have something to say about collation order that wouldn't allow such randomness, but maybe not. It actually makes sense that it doesn't, since Unicode is more or less a mapping of code points to glyphs, which is language independant. The

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Eric Blake wrote: On 05/21/2012 03:02 PM, Linda Walsh wrote: the cat was out of the bag. POSIX 2001 had to continue to allow existing implementations, by stating that range expressions in anything but the C locale are explicitly undefined. - Explicitly undefined

Re: Possible bug: Race condition when calling external commands during trap handling

2012-05-21 Thread Linda Walsh
Andreas Schwab wrote: Bob Proulx b...@proulx.com writes: And lastly I will comment that you are doing quite a bit inside of an interrupt routine. Typically in a C program it is not safe to perform any operation that may call malloc() within an interupt service routine since malloc isn't

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Eric Blake wrote: On 05/21/2012 05:42 PM, Linda Walsh wrote: Only in POSIX 1992 or in the C locale. In POSIX 2001 and POSIX 2008, and non-C locales, [A-Z] is explicitly undefined, == ONLY under POSIX... You may not believe this, but there are other standards than POSIX

Re: locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-21 Thread Linda Walsh
Eric Blake wrote: They still don't make any sense in any locale except C, because POSIX no longer requires collating order. The regex(7) man page says that [xx-xx] uses ***collating order**:: The regex(7) man page _of which system_? Just because _some_ systems (like glibc, picking the

locale specific ordering in EN_US -- why is aAbByYzZ?

2012-05-20 Thread Linda Walsh
As the perl folks are about to release another version with yet more major unicode corrections (apparently they have had to redo alot of namespace and unicode stuff in every major version since 5.6 due to the changing of the guard (amongst other reasons). But perl has the ability in the

Re: Parallelism a la make -j n / GNU parallel

2012-05-12 Thread Linda Walsh
Ole Tange wrote: On Sat, May 12, 2012 at 9:34 AM, Linda Walsh b...@tlinx.org wrote: Ole Tange wrote: Can you explain how that idea would differ from sem (Part of GNU Parallel)? � � � �Because gnu parallel is written in perl? �And well, writing it in perl that's near easy... did

Re: Severe Bash Bug with Arrays

2012-05-05 Thread Linda Walsh
with your views of anything. Maarten Billemont wrote: On 26 Apr 2012, at 01:18, Linda Walsh wrote: Ishtar: echo ${b[*]} Please note that expanding array elements using [*] is usually NOT what anyone wants. I didn't say never to use ${b[*]}. What I *did* say, is never to use ${b

Re: Severe Bash Bug with Arrays

2012-04-27 Thread Linda Walsh
Greg Wooledge wrote: NEVER use eval plus a brace expansion to generate a list. That's just freakin' evil. And unsafe: === But I _like_ evil sometimes! :- imadev:~$ a=(lib tmp bin share '`date`') imadev:~$ (export IFS=,;eval echo /usr/{${a[*]}}) /usr/lib /usr/tmp /usr/bin /usr/share

(yet more OT) was (Re: reply style (OT))

2012-04-27 Thread Linda Walsh
p.s. - the previous was yet, another example of tailoring a response to a specific situation (in case that wasn't obvious); I think it's a first for me to deliberately use someone else's addr to send such a response. my apologies to any who were offended.

no-empty-command-line-completion -- thought fixed in 4.2? when?

2012-04-27 Thread Linda Walsh
I thought this was fixed in 4.2, yet I'm still seeing it... when's this going to be fixed? It's driving me crazy, as bash drops input because it asks questions about displaying 1000's of completions...). when I paste a few lines of source in at the shell -- doesn't matter if it is bash

Re: Is it possible or RFE to expand ranges of *arrays*

2012-04-27 Thread Linda Walsh
Maarten Billemont wrote: On 26 Apr 2012, at 06:30, John Kearney wrote: Am 26.04.2012 06:26, schrieb Linda Walsh: I know I can get a=abcdef echo ${a[2:4]} = cde how do I do: typeset -a a=(apple berry cherry date); then get: echo ${a[1:2]} = berry cherry ( non-grouped args) I tried to do

Re: Is it possible or RFE to expand ranges of *arrays*

2012-04-26 Thread Linda Walsh
John Kearney wrote: echo ${a[@]:1:2} --- Thanks!...I couldn't believe there wasn't some way to do it, but darned if I couldn't think of it or find it for that matter... sigh. Thanks again!

Re: Severe Bash Bug with Arrays

2012-04-26 Thread Linda Walsh
Maarten Billemont wrote: On 26 Apr 2012, at 01:18, Linda Walsh wrote: Ishtar: echo ${b[*]} Please note that expanding array elements using [*] is usually NOT what anyone wants. --- It was exactly what I wanted for my example to work. Please don't suggest non-working solutions

Is it possible or RFE to expand ranges of *arrays*

2012-04-25 Thread Linda Walsh
I know I can get a=abcdef echo ${a[2:4]} = cde how do I do: typeset -a a=(apple berry cherry date); then get: echo ${a[1:2]} = berry cherry ( non-grouped args) I tried to do it in a function and hurt myself.

Re: how are aliases exported?

2012-04-16 Thread Linda Walsh
Maarten Billemont wrote: On 16 Apr 2012, at 09:54, Maarten Billemont wrote: On 15 Apr 2012, at 22:52, Linda Walsh wrote: But I want the syntax include file.shh to just 'work', i.e. first time, it would call my include file, which defines the function... I'm sorry, tell me again why you

Re: how are aliases exported?

2012-04-16 Thread Linda Walsh
Maarten Billemont wrote: On 16 Apr 2012, at 11:43, Linda Walsh wrote: But it won't work for files below the top level of the library directory. if I have include system/errno.shh, Source is crippled to not look in PATH. When there's a slash in the file, it stops searching PATH. So

Re: how are aliases exported?

2012-04-15 Thread Linda Walsh
Pierre Gaston wrote: On Sat, Apr 14, 2012 at 8:31 AM, Pierre Gaston pierre.gas...@gmail.com mailto:pierre.gas...@gmail.com wrote: On Sat, Apr 14, 2012 at 3:44 AM, Linda Walsh b...@tlinx.org mailto:b...@tlinx.org wrote: Dennis Williamson wrote: Aliases

Re: how are aliases exported?

2012-04-15 Thread Linda Walsh
Pierre Gaston wrote: 2) non-interactive bash Aliases are off by default. So given that you need to run something at the beginning of your new bash instance anyway, you could define your aliases in a function together with the mandatory shopt, eg: function start_aliases { shopt -s

how are aliases exported?

2012-04-13 Thread Linda Walsh
How can I export an alias so it survives across an exec? I thought there was a way for them to be exported like vars or functions... but neither work. I have a prog that needs an alias defined, if it isn't, it execs a program to define the alias which re-execs the first -- if the alias

Re: inconsistency with readonly and scope

2012-04-13 Thread Linda Walsh
Chet Ramey wrote: This is intended. Bash doesn't allow a local copy of a variable to override a readonly global one. This can be a potential security hole, --- You can look at it that way, but it also hinders modular programming. If I declare a variable to be local, I wouldn't expect it

Re: status on $[arith] for eval arith vsl $((arith))??

2012-04-11 Thread Linda Walsh
Chet Ramey wrote: On 4/9/12 9:07 PM, Linda Walsh wrote: ** linux-kernel -- all over the place... At that point, I was getting too many to keep up with ... so I stopped searching... $[] has is -- I would bet, Universally, used MORE than $(())... I believe you'd lose, but it's unprovable

Re: status on $[arith] for eval arith vsl $((arith))??

2012-04-11 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Apr 11, 2012 at 02:34:01AM -0700, Linda Walsh wrote: - for ((vl=$((v_level - 1)); $vl 0; --vl)) The inside of the for ((...)) is already a math context. You don't need another $((...)) inside it. for ((vl = v_level - 1; vl 0; --vl)) Or is that another

Re: status on $[arith] for eval arith vsl $((arith))??

2012-04-09 Thread Linda Walsh
Maarten Billemont wrote: On 08 Apr 2012, at 21:30, Chet Ramey wrote: On 4/8/12 3:02 PM, Maarten Billemont wrote: Any particular reason for not removing old undocumented functionality, or is that mostly the nature of this beast - dragging along and maintaining ancient code for the sake of

Re: status on $[arith] for eval arith vsl $((arith))??

2012-04-09 Thread Linda Walsh
Maarten Billemont wrote: Any particular reason for not removing old undocumented functionality, or is that mostly the nature of this beast - dragging along and maintaining ancient code for the sake of compatibility? So 'yesturday' is ancient for you?... that's really means

Re: semicolon at beginning of line

2012-04-07 Thread Linda Walsh
Elliott Forney wrote: I wish bash would happily execute lines that begin with a semicolon, i.e., treat it as a no-op followed by a command. The following examples come to mind: $ infloop echo hello hello $ infloop; echo hello bash: syntax error near unexpected token `;' $ echo hello;

status on $[arith] for eval arith vsl $((arith))??

2012-04-07 Thread Linda Walsh
In modifying some released code on my distro,I ran into the extensive use of $[arith] as a means for returning arithmetic evaluations of the expression. I vaguely remember something like that from years ago, but never see any reference to it -- yet it works, and old code seems to

Re: status on $[arith] for eval arith vsl $((arith))??

2012-04-07 Thread Linda Walsh
Mike Frysinger wrote: On Saturday 07 April 2012 16:45:55 Linda Walsh wrote: Is it an accidental omission from the bash manpage? it's in the man page. read the Arithmetic Expansion section. -mike My 4.2 manpage says: Arithmetic Expansion Arithmetic expansion allows

Re: Expanding aliases to full command before execution

2012-04-06 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Apr 04, 2012 at 04:08:04PM -0700, Linda Walsh wrote: function ll { ... } Just for the record, a one-line function definition requires a ; before the closing curly brace. ll() { ls -l $@;} --- Can you say 'irrelevant detail'? I was discussing

Re: Expanding aliases to full command before execution

2012-04-04 Thread Linda Walsh
jrrand...@gmail.com wrote: function expand_alias() # expand an alias to full command { if [ $1 = . ]; then argument=\\$1 else argument=$1 fi match=$( alias -p | grep -w alias $argument= ) if [ -n $match ]; then expanded=`echo $match

Re: weird behavior of set -e

2012-04-04 Thread Linda Walsh
mhenn wrote: Am 24.06.2011 11:51, schrieb Harald Dunkel: Hi folks, A colleague pointed me to this problem: If I run ( set -e; ( false; echo x ) ) in bash 4.1.5, then there is no screen output, as expected. If I change this to ( set -e; ( false; echo x ) || echo y ) then I

Re: bash 4.2 breaks source finding libs in lib/filename...

2012-03-02 Thread Linda Walsh
:34:21 -0800 From: Linda Walsh b...@tlinx.org To: bug-bash bug-bash@gnu.org I have several files that ***source*** the ***lib*** files*** by expecting the name of the lib to be checked against PATH -- How look up [lib] files relative to PATH regardless of them having a '/' in them? --- You

Re: RFE: allow bash to have libraries

2012-03-01 Thread Linda Walsh
John Kearney wrote: ... [large repetitive included text elided...] why not just do something like this? 26 line suggested 'header' elided... gives you more control anyway, pretty quick and simple. At least 30% of the point of this is to take large amounts of common initialization

Re: bash 4.2 breaks source finding libs in lib/filename...

2012-02-29 Thread Linda Walsh
Greg Wooledge wrote: On Tue, Feb 28, 2012 at 05:34:21PM -0800, Linda Walsh wrote: How can one get the same behavior as before and look up files relative to PATH regardless of them having a '/' in them? What? That sounds like it WAS a bug before, and you had somehow interpreted

Re: RFE: allow bash to have libraries (was bash 4.2 breaks source finding libs in lib/filename...)

2012-02-29 Thread Linda Walsh
Eric Blake wrote: On 02/29/2012 12:26 PM, Linda Walsh wrote: Any pathname that contains a / should not be subject to PATH searching. Agreed - as this behavior is _mandated_ by POSIX, for both sh(1) and for execlp(2) and friends. Is it that you don't read english as a first language

Re: bash 4.2 breaks source finding libs in lib/filename...

2012-02-29 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Feb 29, 2012 at 11:26:06AM -0800, Linda Walsh wrote: Greg Wooledge wrote: Any pathname that contains a / should not be subject to PATH searching. You are alone in this opinion -- as most application don't follow that rule. ?? Try

bash 4.2 breaks source finding libs in lib/filename...

2012-02-28 Thread Linda Walsh
I have several files that source the lib files by expecting the name of the lib to be checked against PATH -- but this no longer works when the library is in lib/filename. How can one get the same behavior as before and look up files relative to PATH regardless of them having a '/' in them?

Re: Fix u32toutf8 so it encodes values 0xFFFF correctly.

2012-02-22 Thread Linda Walsh
Eric Blake wrote: Not only can wchar_t can be either signed or unsigned, you also have to worry about platforms where it is only 16 bits, such as cygwin; on the other hand, wint_t is always 32 bits, but you still have the issue that it can be either signed or unsigned. What platform uses

Re: Fix u32toutf8 so it encodes values 0xFFFF correctly.

2012-02-22 Thread Linda Walsh
Eric Blake wrote: On 02/22/2012 05:19 AM, Linda Walsh wrote: Eric Blake wrote: Not only can wchar_t can be either signed or unsigned, you also have to worry about platforms where it is only 16 bits, such as cygwin; on the other hand, wint_t is always 32 bits, but you still have the issue

Re: Fix u32toutf8 so it encodes values 0xFFFF correctly.

2012-02-22 Thread Linda Walsh
Eric Blake wrote: Don't think of it as 'wide-int', rather, think of it as 'the integral type that both contains wchar_t and WEOF'. You cannot write 'signed wint_t' nor 'unsigned 'wint_t'. --- ?? You say don't think of it that way, but unless I missed something, just like wchar stood for

Re: set -e in (subshells) does not work independently of outer context

2012-02-08 Thread Linda Walsh
Eric Blake wrote: On 01/30/2012 02:27 PM, Linda Walsh wrote: Chet Ramey wrote: As Eric said, the other parts of the Posix description make it clear that the `ignoring set -e' status is inherited by subshells. The original POSIX standard made this clear -- in that it was only

Re: set -e in (subshells) does not work independently of outer context

2012-02-08 Thread Linda Walsh
to compare and look at those who are engaged in dictatorial actions, and those who are more commonly marginalized as outsiders, I'm sure such a comparison would be 'pointless' (though ironic). Chet Ramey wrote: On 2/8/12 6:31 PM, Linda Walsh wrote: Adhering to orders that are wrong, because it's

OT Re: set -e in (subshells) does not work independently of outer context

2012-02-08 Thread Linda Walsh
Chet Ramey wrote: On 2/8/12 9:28 PM, Linda Walsh wrote: Please note, I didn't compare anyone or their actions to those of Nazi's, This discussion has gone on for a long time; the probability of a comparison involving Nazis hit 1; ipso facto, Godwin's Law holds. But that would

Re: bash man page needs more examples...(i.e. 0)

2012-01-30 Thread Linda Walsh
DJ Mills wrote: OK. �How about if that sentence began with `When specifying n, the digits greater ...'? declare -i foo; foo=20#a2; echo $foo 202 [base#]n, 'base' is a INTEGER 2-64, then '#', followed by the number. ^^^ That's much more clear!

Re: bash man page needs more examples...(i.e. 0)

2012-01-30 Thread Linda Walsh
DJ Mills wrote: OK. �How about if that sentence began with `When specifying n, the digits greater ...'? declare -i foo; foo=20#a2; echo $foo 202 [base#]n, 'base' is a INTEGER 2-64, then '#', followed by the number. --- Slightly more exact/pedantic, how about: Syntax for integer

(low priority) BUG: too large history=nohistory? (was: Re: How to enable infinite command history)

2012-01-30 Thread Linda Walsh
It seems there is a a platform dependent bug somewhere: HISTSIZE=$(((3**15)) echo $HISTSIZE 1000 --- but you have no history... Pierre Gaston wrote: Setting HISTFILESIZE to 2147483647 gives you 68 years of history at one command per seconds (I hope I got my math right) with say

Re: set -e in (subshells) does not work independently of outer context

2012-01-30 Thread Linda Walsh
Chet Ramey wrote: As Eric said, the other parts of the Posix description make it clear that the `ignoring set -e' status is inherited by subshells. The original POSIX standard made this clear -- in that it was only a failure of a 'simple' command that resulted' in an err-exit'.

Re: bash man page needs more examples...(i.e. 0)

2012-01-29 Thread Linda Walsh
Andreas Schwab wrote: Linda Walsh b...@tlinx.org writes: var=0a32; echo $var -bash: 0a32: value too great for base (error token is 0a32) Which part of Constants with a leading 0 are interpreted as octal numbers did you not understand? The part that said the ones that start with 0

Re: read -ei y -p bug(s)

2012-01-19 Thread Linda Walsh
Chet Ramey wrote: On 1/14/12 12:49 AM, Linda Walsh wrote: /* vim: ts=1 sw=1 et sc fo=cqwa1 tw=78 syntax=css */ There's actually 1 parts 2 this, I ran into the 2nd while testing the first... Like Greg Wooledge, I wasn't able to reproduce the second issue with `read -N 1' (which I

read -ei y -p bug(s)

2012-01-13 Thread Linda Walsh
/* vim: ts=1 sw=1 et sc fo=cqwa1 tw=78 syntax=css */ There's actually 1 parts 2 this, I ran into the 2nd while testing the first... I wanted to be able to check the keyboard if the user had 'typed' ahead, and mean to answer an upcoming question on purpose or if it was left over from a

Re: Specify completion without name

2012-01-11 Thread Linda Walsh
Clark J. Wang wrote: On Fri, Jan 6, 2012 at 00:33, Peng Yu pengyu...@gmail.com wrote: But beware to clearly document these by giving working EXAMPLE code which include these three commands (not just text explanation without working code, by working code I mean code snippet is discouraged, a

Re: How to match regex in bash? (any character)

2011-11-17 Thread Linda Walsh
Chet Ramey wrote: On 9/27/11 6:41 PM, Roger wrote: Correct. After reading the entire Bash Manual page, I didn't see much mention of documentation resources (of ERE) besides maybe something about egrep from Bash's Manual Page or elsewhere on the web. After extensive research for

bash: while: command not found? ??

2011-11-07 Thread Linda Walsh
At the # prompt, if I type: # filename cat it takes filename and pipes it as input into cat. then, why, when I type: # filename while read ln; do echo $ln; done do I get... bash: syntax error near unexpected token `do' So I try putting do on a separate line: # filename

Re: accents

2011-08-25 Thread Linda Walsh
` Greg Wooledge wrote: On Wed, Aug 24, 2011 at 06:51:32PM -0700, Linda Walsh wrote: BTW, Thomas -- what is the Character that comes after 'De' in your name? I read it as hex '0xc282c2' which doesn't seem to be valid unicode. RFC 2822 (section 2.2) says that Header Fields

OT: characters sets in mail headers (was: Accents)

2011-08-25 Thread Linda Walsh
Thomas De Contes wrote: Le 25 août 2011 à 14:36, Greg Wooledge a écrit : On Wed, Aug 24, 2011 at 06:51:32PM -0700, Linda Walsh wrote: BTW, Thomas -- what is the Character that comes after 'De' in your name? I read it as hex '0xc282c2' which doesn't seem to be valid unicode

Re: accents

2011-08-24 Thread Linda Walsh
Chet Ramey wrote: In yours, however, it is 0x65 0xcc 0x81 which is U+0065 LATIN SMALL LETTER E followed by U+0301 COMBINING ACUTE ACCENT. That's not valid UTF-8, since UTF-8 requires that the shortest sequence be used to encode a character. This is exactly true... Valid UTF-8 is

Re: Syntax Question...

2011-08-19 Thread Linda Walsh
Greg Wooledge wrote: On Tue, Aug 16, 2011 at 03:41:19PM -0700, Linda Walsh wrote: Ken Irving wrote: Maybe this? today_snaps=( ${snap_prefix} ) but as you mention, that will put them into an arraysorry imprecise terminology list for me is some number of objects in a string

Re: conditional aliases are broken

2011-08-18 Thread Linda Walsh
` Eric Blake wrote: On 08/15/2011 04:40 PM, Sam Steingold wrote: * Andreas Schwabfpu...@yvahk-z68x.bet [2011-08-15 22:04:04 +0200]: Sam Steingolds...@gnu.org writes: Cool. Now, what does this imply? For almost every purpose, shell functions are preferred over aliases. so, how do I

Re: Syntax Question...

2011-08-18 Thread Linda Walsh
Greg Wooledge wrote: [[[ yeah, am running a bit behind]... On Mon, Aug 15, 2011 at 12:45:58AM -0700, Linda Walsh wrote: #!/bin/bash -exu +[shopt -s expand_aliases extglob] alias sub=function alias unless='if !' Aliases don't even *work* in scripts. Hopefully you someone

Re: Syntax Question...

2011-08-18 Thread Linda Walsh
Pierre Gaston wrote: On Mon, Aug 15, 2011 at 2:31 AM, Linda Walsh b...@tlinx.org wrote: Re: BashFAQ/006: http://mywiki.wooledge.org/BashFAQ/006 Pierre Gaston wrote: Linda: please show quote the section that shows using an variable that holds the name of an array to be used

Re: conditional aliases are broken

2011-08-18 Thread Linda Walsh
` Greg Wooledge wrote: On Thu, Aug 18, 2011 at 08:03:41AM -0700, Linda Walsh wrote: 4.2 introduce a new -g to declare a global variable inside a function. Which doesn't say what it would do in situations like the above. Then let's test: imadev:~$ echo $BASH_VERSION

Re: Syntax Question...

2011-08-18 Thread Linda Walsh
` Chet Ramey wrote: On 8/18/11 9:37 AM, Greg Wooledge wrote: The word following the redirection operator in the following descrip- tions, unless otherwise noted, is subjected to brace expansion, tilde expansion, parameter expansion, command substitution, arithmetic expan???

general bash oddities and discussion (was Re: Syntax Question...)

2011-08-18 Thread Linda Walsh
` Greg Wooledge wrote: Now that one is suprising, as it's supposed to take the output of the ... hmmm.yup!... that's exactly what it does. takes the work and executes it and returns the results on stdin as a single quoted blob of output: read a *.txt echo $a

Re: Syntax Question...

2011-08-16 Thread Linda Walsh
` Dennis Williamson wrote: Also, it's usually not necessary to maintain an index variable and use shift in a while loop. Use for arg; do which uses an implied $@. I tried to implement your suggestion and quickly ran into the reasons why I did what I did. Using the 'for

Re: Syntax Question...

2011-08-16 Thread Linda Walsh
Dennis Williamson wrote: On Mon, Aug 15, 2011 at 10:19 PM, Linda Walsh b...@tlinx.org wrote: How do I determine the location of my script? http://mywiki.wooledge.org/BashFAQ/028 ??? I don't understand the need for complexity -- what I have works. Its a few lines@ most -- I use

Re: Syntax Question...

2011-08-16 Thread Linda Walsh
Ken Irving wrote: On Mon, Aug 15, 2011 at 08:19:01PM -0700, Linda Walsh wrote: today_snaps=$('ls' -1 ${snap_prefix} 2/dev/null |tr \n ) This one is so bad, I saved it for last. Ack! Pt! Wait, what? Why? What the? Huh? ... What would you do to search for files w

Re: Syntax Question...

2011-08-15 Thread Linda Walsh
` Linda Walsh wrote: The latest error I got is a a simple type -- most of them probably are, with that many lines of code in ~3-4 weeks, there's bound to be -- trouble is I'm stubborn sometimes about 'punishing myself'' when I mess up...which isn't always productive! ;-) Sometimes

Re: Syntax Question...

2011-08-15 Thread Linda Walsh
` Dennis Williamson wrote: On Greg already covered some important points and I'll add a few more. *cough* sorry, I just haven't responded ... I threw up my hands in disgust and got too irritated to respond, so have done other things. As has been said before,

<    1   2   3   4   5   6   >