o examine it
> more closely to find out why it's a good idea in this case to use an array
> index and *then* sanity check it's value.
So use that as the justification for the patch, rather than expecting us
to figure it out your intentions on our own.
--
Eric Blake eblake redh
gt; entirely:
>
> $ ksh -c 'printf "<%.010d> <%.*d>\n" 1 010 1'
> <01> <01>
I actually think the ksh behavior makes more sense; and bash could
change to be made compatible with ksh without violating any POSIX
constraints.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
comparisons */
> + for (l = home ? strlen (home) : 0; l > 1 && home[l-1] == '/'; l--);
> +
Does this still work correctly on systems where / and // are distinct
(as allowed by POSIX) and someone has set $HOME to //?
--
Eric Blake eblake redhat com+1-9
cution, not parse).
(I've seen ONE case where an alias can do things that a function cannot:
writing an alias for 'find' that temporarily inhibits globbing on the
arguments for JUST the find command - that has to be done via an alias,
because it depends on affecting the parse, and a fu
On 05/30/2014 12:40 PM, Andreas Schwab wrote:
> Bruce Korb writes:
>
>> Thanks, Eric & Chet. I hope nobody ever needs to load up a set of
>> aliases within a Makefile script.
>
> A non-interactive shell does not have aliases.
Unless you explicitly turn them on.
t at
least we're in good company, since ksh has the same behavior (well,
there $? is set to 258, since ksh takes advantage of the POSIX rule that
it can represent exit due to signal in $? by using values that are
unambiguous with regular exit). zsh almost has the same behavior,
except it se
ver and on individual subscribers behind bandwidth
limits. Sending the text patch (several kilobytes) is sufficient.
Furthermore, your binary build is unlikely to run on anyone with a
system configured differently than yours, while anyone can apply your
patch and rebuild it to test the quality of you
name`" ]; then echo "r" ; else echo "not r" ; fi
> $ if [ -n "`pgrep pname`" ]; then echo "r" ; else echo "not r" ; fi
> $ if [ ! -n "`pgrep pname`" ]; then echo "not r" ; else echo "r" ; fi
Glad you figured out your quoting bug.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
t; in the conditional ?
Don't use ! in the conditional. Take time to grab the status yourself.
$ if _F ; then :; else echo '_F returned: '$?; fi
>
> Is there any other conclusion than : "if you want to access the return
> status of a
> function in an if clause ,
d generic support for --help to all builtins, instead of
requiring users to remember 'help foo' as yet another item in their
arsenal alongside 'info foo', 'man foo', and 'foo --help'.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualiz
> The only concerns I can think of are inconsistency with programs that use
> execvp(), or possibly double-expansion in the event of a user name or any
> path
> containing ~.
>
> You're probably right in that it's not super critical if it hasn't caused
> prob
On 07/23/2014 08:08 AM, lolilolicon wrote:
> On Wed, Jul 23, 2014 at 9:58 PM, Eric Blake wrote:
>>
>> Might be worth asking the POSIX folks if it is allowed by POSIX. What
>> do other shells do?
>
>>From this page: http://pubs.opengroup.org/onlinepubs/7908799/xcu
On 07/23/2014 08:38 AM, Eric Blake wrote:
> On 07/23/2014 08:08 AM, lolilolicon wrote:
>> >From this page: http://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html
>>
>> Note that the tildes are expanded during the assignment to PATH, not
>> when PATH is
assignments and word expansions.
And that bash is the odd one out in comparison to all other shells. I
think bash is buggy for performing tilde expansion during PATH lookup
for literal tildes contained in PATH, because no other shell does it,
and POSIX does not specify that it would happen.
he next cygwin dll release, with no need for bash to do
anything differently than it has always done.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ho -n
> ~$ echo -n -n
> ~$ echo -n -- -n # I think that the output should just be "-n" not "-- -n".
> -- -n~$
For that matter, POSIX requires this to output "-n -- -n", since POSIX
does not allow for echo to interpret -n. In fact, if you do 'shopt -s
xpg_e
d: ef
> Got: abcdef
echo "${x: -2}"
>
> or:
> x="abcdef"; echo "${x:-2:1}"
> Expected: e
> Got: abcdef
echo "${x: -2:1}"
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
th m4 and gawk use it so that a stack recursion exits
gracefully rather than with a segfault and core dump (after all, it's
the user's fault for putting in bad input, not a bug in the program).
Maybe it's worth investigating if bash could link with it?
--
Eric Blake eblake redha
limit we pick, other than unlimited (your
proposal of turning it to 0), would be an arbitrary limit for someone
who has a machine with more memory and a larger stack. So 0 is the only
sane default, but that's no different than what we already have.
--
Eric Blake eblake redhat com
of the default behavior of dumping
core). But someone would have to write the patch for bash to link
against libsigsegv.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
be on by
default. Which means that you will only know if the solution makes a
difference for your program if you first run the program unlimited - but
then you are back to the earlier question of whether bash can give a
nice error message instead of a core dump when exiting due to stack
overflow.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
n the stack overflows due to a buggy user input. It's not
a bug in bash, but in the user program; and that's WHY libsigsegv exists
(to convert what would have been a core dump into a nice error message,
making it obvious that the bug was in the user input).
--
Eric Blake eb
add libsigsegv?
Patches speak louder than words in open source projects. If you are up
to taking on the task, go for it. You can use GNU m4 and gawk as
examples of programs that have integrated in libsigsegv stack overflow
detection.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
t;(){ :; }"
$ f='() { :; }' bash -c 'type f; echo "\"$f\""'
f is a function
f ()
{
:
}
""
and I'd feel much more comfortable with exporting f()=... as the
backdoor for passing the function definition, _particularly_ since the
shell already al
rstand the SAME interpretation of 'f()=...' in the
environment as a way to export shell functions, and leave 'f=() {...' as
a raw normal variable and avoid intruding on the user's possible string
space.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
On 09/25/2014 11:21 AM, Nick Bowler wrote:
> On 2014-09-25 08:55 -0600, Eric Blake wrote:
>> On 09/25/2014 07:51 AM, Bob Friesenhahn wrote:
>>> It may be that some users of 'autoconf' will be at risk due to the dire
>>> bash security bug described at
>>
On 09/25/2014 01:15 PM, Linda Walsh wrote:
> Eric Blake wrote:
>> And _that's_ what I want changed, by proposing that bash use 'f()=...'
>> rather than 'f=() {...' as the magic it uses for exporting functions
>> from parent to child.
>>
> -
5.1-alpha1/support/shobj-conf2005-08-06 15:03:02.389125000 -
0600
> -466,6 +468,23
> SHLIB_STATUS=unsupported
> ;;
>
> +cygwin*)
...
> + SHLIB_LIBS=-lcurses
SHLIB_LIBS='$(TERMCAP_LIB)'
--
Eric Blake
__
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 7/23/2005 7:14 AM:
>
> The following patch, to both readline and bash, allows readline to export
> a hook (rather than trying to import a function, which doesn't work in
> dynamic libraries for at least
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 8/12/2005 7:20 AM:
> According to Eric Blake on 7/23/2005 7:14 AM:
>
>>>The following patch, to both readline and bash, allows readline to export
>>>a hook (rather than trying to import a functio
n the presence of drive
letters.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozde
ately, it is an extension of GNU make that is not portable
to other make programs. If bash is to remain compilable on as
many platforms as it currently is, its Makefiles must not be changed
to use these non-portable extensions.
--
Eric Blake
___
Bug-ba
:$line $bp $cl${_lines[$line]}"
>fi
> }
>
> @@ -564,7 +564,7 @@
> let _i=1
>
> # Be careful about quoted newlines
> -_potbelliedpig=${TMPDIR-/tmp}/$_guineapig.$$
> +_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$
> sed 's,\\$,,' $_guineapig > $_potbelliedpig
>
> Thanks,
> Devin Bayer
&g
.SH SEE ALSO
bash(1), sh(1)
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http
;t affect $PIPESTATUS?
$ echo ${BASH_VERSINFO[*]}
3 00 16 12 release i686-pc-cygwin
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblak
This was reported on the cygwin list. I don't know if bash-3.1/
readline-5.1 have fixed the issue or not. I also don't have
access to a debian machine to try reproducing it myself.
-- Forwarded Message: --
From: Christopher Faylor <[EMAIL PROTECTED]>
To: cygwin@cygwin.com
substitution;
this is no longer the case with the POSIX shell."
Therefore, I read this as stating that POSIX requires your example
to succeed, and that bash has a bug (FYI, the bug also appears
in my installed versions of zsh and ksh).
Meanwhile, as a workaround, use:
$ k=$(case x in (x) :;
t answer of the three
bash 3.1.1:
$ echo $(
> cat << /eof
> a here-doc with )
a here-doc with
$ # oops, the ) in the here-doc was consumed to close the $(), and
$ # without a warning of a missing eof delimiter
$ echo $(
> echo abc # a comment with )
> )
abc
)
$ # oops, an
> Eric> $ k=$(case x in (x) :; esac)
> Huh, they only taught us ) in school.
> Is () since Bell Labs days too?
POSIX requires shells to support case x in (x), but older
bourne shells do not support this newer syntax. That is
probably why you were not taught it; if I understand
corre
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 12/28/2005 12:00 PM:
>
> My results: bash 3.1, with or without patch 1, still has
> the bug.
>
> $ k=$(case x in x) echo hi; esac)
> bash: syntax error near unexpected token `esac'
While we are co
in PATH prior to the
hashed location of a command. Maybe someone would like to submit a patch
that does that? If so, it would probably belong to another shopt setting,
since the point of hashing is to avoid extra stat calls.
- --
Life is short - so eat dessert first!
Eric Blake [EM
Also, be aware that bash also defines a unary -o, so the
following also has strange results, for the same reasons as above:
$ set -o monitor
$ rm -f monitor
$ test -o monitor && echo true
true
$ test ! -o monitor && echo true
true
- --
Life is short - so eat dessert first!
Eric
e that if
your script strives for POSIX conformance, you must pass a utility name as
an argument to time; it is a bash extension that time works without arguments.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 1/7/2006 8:17 AM:
>
> Now, in this case, you have three arguments, and POSIX requires that the
> binary operator "-a" have higher precedence than the "!" negation operator
> on a 2-argument
d
> Stopping myself...-bash: [: =: unary operator expected
>
>
> Repeat-By:
>
> Logging in via SSH
Works for me. You'll have to provide more details, such as the actual
line with [ that failed when bash tried to execute it.
- --
Life is short - so eat dessert first!
Eric
tch
> that comments out the troublesome code.
My only concern is whether this patch also affects {non-,}incremental
searches in emacs mode. But it sure solves the display bugs of doing
non-incremental searches in vi mode. Thanks for the patch.
- --
Life is short - so eat dessert first!
Eri
#x27; # After this, I hit [ENTER][ESC]/P[Ctrl-c]
%
%
% /
% /
% /P
% # Wow - look at those extra lines!
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 2/17/2006 9:48 PM:
>
> It seems I spoke too soon. Your patch works great on single-line prompts
> with invisible characters, but breaks on multiline prompts.
I have tested this patch with both emacs (M-p) an
wline]a'. So I think you did
find a regression - bash 3.0 is correct in preserving the newline between
the quoted backslash and remaining characters, while bash 3.1 (through
patchlevel 9) is incorrect in performing newline joining.
- --
Life is short - so eat dessert first!
Eric Blake
'a\')
a\
So as a workaround, the test can be rewritten:
status=$(echo '-'| { ${GREP} -E -e 'a\' >/dev/null 2>&1 ; echo $?; })
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: G
[Please use mailing lists instead of sending private mail
to random developers - I don't know whether you
intended this as a question about bash proper or
about the cygwin port of bash, so I have cross-posted
my reply]
> Hi Eric,
>
> I found the following message (from July 2005)
involve finding a different way to solve the original problem that
> prompted the change.
>
I look forward to seeing what you come up with. I wish I
could help by coming up with a solution myself, but have not
had time to do so yet.
--
Eric Blake
_
necessary, open up a second web-based email account rather
than sending from an account that includes such a disclaimer.
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
of `` when
searching for the terminating ` are the constructs \\, \`, and \$.
>
> I will see if I can find a way to preserve backwards compatibility.
>
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
command's
output. POSIX doesn't specify whether this behavior is allowed
or not, but I think it makes more sense for command substitution
to strip NULs than to risk the inconsistency of arguments being
chopped short as they are passed through exec() calls.
--
Eric Blake
__
mailed the
bug-coreutils mailing list. However, my guess is that you have
an alias in place such that you are executing 'ls -F' or 'ls -p'
rather than 'ls'. Try 'type ls' to learn more about what is really
happening, before incorrectly calling this a bug.
export LINES COLUMNS
before invoking your app that does not know how to query the terminal for
its normal size.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.com
-
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.m
ing shopt -s xpg_echo),
both -e and -n should therefore be literal strings, not options.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~eri
>
> I would like to redirect into a variable.
variable=$(command 2>&1)
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.g
-
William
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFELUiy
ate POSIX semantics.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
i
adline feature off (add
"set bind-tty-special-characters off" to ~/.inputrc), or to tell your
terminal to not bind Ctrl-V (add "stty lnext undef" to your ~/.bash_profile).
If you like emacs bindings, where Ctrl-Q is the quoting character
instead of Ctrl-V, you could do "stty
t, which is why
it will accept options even when bash won't.
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
re are still some known issues with `` command substitution
parsing in bash-3.1 that have been previously reported, such as
http://lists.gnu.org/archive/html/bug-bash/2006-03/msg00039.html.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGN
[Please keep replies on the list, so that others that encounter the
same problem may see it in the archives, and so that you can
get comments from more than just me.]
> On Tuesday 02 May 2006 09:15, you wrote:
> > According to Richard on 5/1/2006 5:46 PM:
> > > 602 status=`echo 'beriberi'| {
t - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEWfmR84KuGfSFAYARAsYZAKD
\d
> > \t\a\]\[\e[31;1m\][\[\e[36;[EMAIL PROTECTED]
> > \[\e[33;1m\]\W\[\e[31;1m\]]\[\e[34;1m\]\[\e[32;1m\]\$ \[\e[37;1m\]"
> > - ---8<->8---
> >
> > If type "ls /usr/src" twice, it will show "ls /usr/s
the exit
> code of each command when it terminates.
Bash already has this, in the prompt. For example, I use:
PS1='${PIPESTATUS[*]}\$ '
At which point I see the exit status of every command in the previous
pipeline.
- --
Life is short - so eat dessert first!
Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Please keep replies on the list, so that others may help with suggestions.
According to A P Garcia on 6/1/2006 12:54 PM:
> On 6/1/06, Eric Blake <[EMAIL PROTECTED]> wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
&
' or ';'. Using BOTH '&' and ';' is the
true syntax error, and the above example is not a workaround, but the
correct syntax.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.
Try repeating the test when
LC_ALL=C is in your environment, to see the difference. Some locales,
such as en_US.utf8, intentionally do case folding in ranges, so that [A-Z]
is interpreted as [AbBcC...zZ].
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-
ion of bash depends on) has not yet been ported to that
platform.
At any rate, the cygwin mailing list is a better place to ask these
sorts of questions.
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
he alias is also checked for alias
expansion."
This is intentional, so that you can do something like:
alias nice='nice -n 5 '
and then 'nice ls' will still use the aliases you normally have
for ls.
--
Eric Blake
___
Bug-bash mailing
; xn-CDO-2 $ cd /
> xn-CDO-2 $ echo $PWD
> /
POSIX requires this behavior, whether bash is emulating sh (in which case,
it is really trying to be POSIX compliant, rather than compatible to old
broken bourne sh), or using full extensions.
- --
Life is short - so eat dessert first!
Eric
h as ash) is to use a
subshell to test whether it will work first:
$ (unalias foo) >/dev/null 2>&1 && unalias foo
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key
uot; causes the
> function call to end up with a nonzero exit status only bacause the
> statement appears *on the last line* of the function. The exact same
> statement on the first line of the function behaves as expected.
As marked above, the line causing bash to exit is n
en disabling the problematic driver so that it quits interfering with
cygwin. But bash is using longjmp correctly, so there is no bug to report
on this list.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
volunteer cygwin bash packager
-BEGIN PGP SI
bers, then getting a decimal answer.
>
> Case 2)
>
> pippo=$[09-1]
Again, you used octal numbers, except that 8 and 9 are not valid octal
digits. Don't use the leading 0 if you don't want octal numbers.
- --
Life is short - so eat dessert first!
Eric Blake [E
ollowing a while, until,
or if keyword, and is not a part of an AND or OR list, and is not a
pipeline preceded by the ! reserved word, then the shell shall immediately
exit.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Versi
-
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.m
sn't consume it
all. But this is unacceptable for a shell.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblak
ines the command enough to know which options take
arguments so that reordering will not change the semantics of the command
sounds admirable, but doing so by parsing the target executable just does
not sound like the right approach to me. We don't need to bloat bash by
adding all
specify
> echo -e).
It looks like it is time for coreutils to revisit how /bin/echo should
behave, with or without the presence of POSIXLY_CORRECT. It would be good
for coreutils 6.4 to match bash 3.2 in what escape sequences it understands.
- --
Life is short - so eat dessert first!
Eri
o=$file"
> done
> ---
>
> The backticks work perfectly.
> But the $() gets it very wrong and leaves a double-quote in the result.
That's because `` and $() have different syntax, as required by POSIX.
You should just do $(basename "$f1"), rather than
or not, POSIX standardized the original bourne shell `` behavior,
as well as the ksh $() behavior, and the two behaviors are different. Get
used to it.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Versio
e the POSIX-specified:
find . -exec grep -q PATTERN {} \; -exec vi {} +
That will execute grep once per file, then aggregate the successful
matches into a single invocation of vi (assuming you don't exceed ARG_MAX
limits), properly accounting for spaces in filenames.
- --
Life is s
t
POSIX leaves unspecified. But you are correct that no one uses ^ for
pipes any more - POSIX does not allow ^ to mean pipes.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at
u set IFS for the vi, but not for the command
substitution. Break your result into two commands:
IFS='\n'
vi $(grep -l PATTERN *)
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment
, and newline, regardless of the IFS setting.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG w
reak too many existing scripts. The best
you can do now is learn how they do behave, and code accordingly.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.co
p_offset. */
- - if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented ==
0) &&
+ if (linenum == 0 && (/*MB_CUR_MAX > 1 &&*/ rl_byte_oriented
== 0) &&
cpos_adjusted == 0 &&
_rl_last_c_pos !
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 11/9/2006 10:04 PM:
>
> This patch fixes this particular test case for me, but I have no idea if
> it is correct or breaks something else. The idea is that even when
> MB_CUR_MAX == 1, the cursor absolute
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Eric Blake on 11/9/2006 10:10 PM:
>
> Indeed, this alternative patch also seems to fix the test case for me:
>
> --- bash-3.2-orig/lib/readline/display.c 2006-09-14 12:20:12.0
> -0600
> +++ bash-3.2/lib/
stration required to read the draft; final
version expected in 2008) may relax this so that 'pwd -P' is once again
non-state-changing.
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment:
& /bin/test -r /dev/stdin < /dev/null; then
bash_cv_dev_stdin=present
else
bash_cv_dev_stdin=absent
- --
Life is short - so eat dessert first!
Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment:
n't need to be a redundant path search, and the `hit count', which is
> just a coarse estimate of hashing effectiveness, will be more meaningful.
Any chance this can be made an official patch for 3.2, or do I have to
wait until 4.0 to get this performance increase?
- --
Life is short
* signed for ' ' padding in base 10 */
- flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0;
+ flags = (*p->pf == 'u' || *p->pf == 'U' || *p->pf == 'x' || *p->pf == 'X'
+ || *p->pf == 'o') ? FL_UNSIGNED : 0;
if (*p->pf == 'X')
flags |= FL_HEXUPPER;
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
presence or absence of job control is not the best criteria
for whether to do the /dev/null redirection. The initial /dev/null redirection
MUST occur in non-interactive shells, even if job control is active. However,
for interactive shells, it is still acceptable to use the presence of job
cont
st.c, pass the MT_USETMPDIR flag on to sh_mktmp*.
In lib/sh/tmpfile.c, use snprintf instead of sprintf, to avoid writing
past the end of the xmalloc'd array.
--
Eric Blake
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
201 - 300 of 698 matches
Mail list logo