Re: Manual: clarify what POSIX stands for

2024-03-31 Thread Poor Yorick
On 2024-04-01 03:47, Martin D Kealey wrote: On Thu, 25 Jan 2024, 20:04 Alan Urmancheev, wrote: Currently, Bash's manual definitions section mentions POSIX, but doesn't explain what that abbreviature stands for ... I think that abbreviatures can be confusing, especially when you don't

CPPFLAGS vs project include arguments in lib/glob

2015-08-30 Thread Poor Yorick
AGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS) \ $(LOCAL_CFLAGS) $(CFLAGS) # Here is a rule for making .o files from .c files that doesn't force -- Poor Yorick

Re: undo local variable with unset

2015-01-05 Thread Poor Yorick
On Mon, Jan 05, 2015 at 03:25:56PM -0500, Greg Wooledge wrote: > On Mon, Jan 05, 2015 at 01:14:53PM -0700, Poor Yorick wrote: > > It's nice to be able to create a function like unlocal that moves > > local > > variables out of the way, but I'm wondering if it

undo local variable with unset

2015-01-05 Thread Poor Yorick
In the following script, the effect of calling f0 is that the value global $i is still 5, but the effect of calling f1 is that the value of the global $i is 9. It's nice to be able to create a function like unlocal that moves local variables out of the way, but I'm wondering if it can be relied

nounset option and arrays

2009-02-05 Thread Poor Yorick
In the following example, I was expecting var2 not to be seen as an unbound variable after it was declared. Wouldn't it be more consistent with the treatment of var1 not to issue the unbound variable error in this case? What is the rationale behind the current behavior? bash-3.2$ shopt -

nounset option and arrays

2009-02-05 Thread Poor Yorick
In the following example, I was expecting var2 not to be seen as an unbound variable after it was declared. Wouldn't it be more consistent with the treatment of var1 not to issue the unbound variable error in this case? What is the rationale behind the current behavior? bash-3.2$ shopt -s

Re: removing null elements from an array

2008-07-18 Thread Poor Yorick
Stephane Chazelas wrote: In zsh, removing the empty elements is just a matter of var1=($var1) Wouldn't this corrupt the elements with spaces, just as in bash? -- Yorick

"[EMAIL PROTECTED]" strings in the web archive

2008-07-18 Thread Poor Yorick
What's up with all the "[EMAIL PROTECTED]" strings in the web archives for bug-bash? For example: http://lists.gnu.org/archive/html/bug-bash/2008-07/msg00063.html -- Yorick

removing null elements from an array

2008-07-17 Thread Poor Yorick
To get rid of null elements in an array, I currently do something like this: bash-3.2$ var1=("with spaces" "more spaces" '' "the end") bash-3.2$ for v in "[EMAIL PROTECTED]"; do if test "$v"; then var2+=("$v"); fi; done bash-3.2$ echo [EMAIL PROTECTED] 3 bash-3.2$ printf '%s\

process substition and "source"

2008-06-30 Thread Poor Yorick
In the following example, I expected the commands in the here-documents to be interpreted in the current shell, but it seems they weren't. Is it my misunderstanding, a feature, or a bug? bash-3.2$ echo $BASH_VERSION 3.2.39(1)-release bash-3.2$ . <(cat <

what matched in a case statement

2008-05-13 Thread Poor Yorick
Is there any way to get a handle on what matched in a case statement? Something like this: case "lawlesspoets" in *poets) echo $CASEMATCH one ;; lawless*) echo $CASEMATCH two ;; esac -- Yorick

function names which contain a 'dash' character

2008-05-07 Thread Poor Yorick
ksh refuses to define functions which contain a dash ("-") in the name. The Bash manual also defines 'name' as consisting solely of letters, numbers, and underscores. So shouldn't bash refuse to create functions which contain a dash in the name? -- Yorick

finding the index at which two strings differ

2008-05-06 Thread Poor Yorick
Looking for a simple ways to output the index at which two strings differ. Here is one: cmp <(echo "hello") <(echo "help") | cut -d' ' -f5 | tr -d , Any other suggestions? -- Yorick

interpretation of pound (#) character inside a bracket expression inside single quotes inside backticks

2007-11-18 Thread Poor Yorick
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc -m32 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linu x-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/path /to/bash-3.2/share/loc

printf '\x' exit status is 0

2007-07-10 Thread Poor Yorick
, Inc. [EMAIL PROTECTED]:~$ printf '\x' bash3: printf: missing hex digit for \x [EMAIL PROTECTED]:~$ echo $? 0 [EMAIL PROTECTED]:~$ /usr/bin/printf '\x' /usr/bin/printf: missing hexadecimal number in escape [EMAIL PROTECTED]:~$ echo $

Re: last element of an array

2007-05-24 Thread Poor Yorick
d check the latest "what's new" before posting, but it must have been in a previous one. Thanks. -- Poor Yorick ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

last element of an array

2007-05-24 Thread Poor Yorick
The syntax I'm currently using to access the last element of an array looks a little evil: >arr=( one two three ) >echo ${arr[$(([EMAIL PROTECTED]))]} three If there is not currently a friendlier syntax for this, might I suggest: ${arr[-1]} --

Re: mkfifo and tee within a function

2006-11-28 Thread Poor Yorick
> From: Andreas Schwab <[SNIP]> > Subject: Re: mkfifo and tee within a function > Sent: 2006-11-28 15:09 > > Nathan Coulter <[SNIP]> writes: > > > Could anyone please provide a few pointers on how to accomplish this, and > perhaps explain the results from the above examples? > > A proc

Re: mkfifo and tee within a function

2006-11-28 Thread Poor Yorick
> From: Andreas Schwab <[EMAIL PROTECTED]> > Subject: Re: mkfifo and tee within a function > Sent: 2006-11-28 15:09 > > Nathan Coulter <[EMAIL PROTECTED]> writes: > > > Could anyone please provide a few pointers on how to accomplish this, and > perhaps explain the results from the above e

null command and parameter expansion for "Display error if null or unset"

2006-07-31 Thread Poor Yorick
g on unset variables. -- Poor Yorick ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

(no subject)

2006-07-31 Thread Poor Yorick
The following command does not echo "hello". : ${FAKEVAR?} || echo hello This seems inconsistent, since the return status is set to 1. It would be a convenient and concise syntax for acting on unset variables. -- Poor Yorick ___ Bug-ba