here are probably many others.
> At a guess, I would assume everything that isn't GNU/Linux or BSD.
Gnulib already provides a strftime replacement that guarantees %s, which
is handy since the next version of POSIX is considering requiring %s in
strftime().
--
Eric Blake ebl...@redhat.com
quires that
portable applications pass at most one argument to cd, such that passing
more than one argument triggers unspecified behavior. We might as well
make that behavior intuitive.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
On 12/07/2011 12:02 PM, Eric Blake wrote:
> Or even nicer, behave like zsh, and treat
> cd xxx yyy
> like this (written assuming extglob syntax)
> cd xxx+($' \t')yyy
Correction:
cd xxx+([$' \t'])yyy
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Lib
An error occurred.
Getting a timeout or invalid file descriptor should definitely be
considered error cases that return > 1 (SIGALRM for timeout works well).
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ne '>;' redirection in the
same command, and both target the same end file (whether or not by the
same file name)? What happens if the command succeeds, but the rename
of the temp file to the destination fails? Are there clobber ('>|') or
append ('>>')
NGlQaVF5 | openssl base64 -d
echo OHBjcWNLNGlQaVF5 | openssl base64 -d && echo
or modify your PS1 to start with a newline request.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
a subshell to do what you want. Just do:
read p
set -- "$p"
to set $1, or
read p
set -- $p
to set all of $@ according to the IFS splitting of $p.
>
> So I propose we 'wreck the language' to allow me to do
> $ read @
> to set $@, same with 1, 2,.. * (almost t
n the positional parameters, use set. It's as
simple as that. What's wrong with:
read -a myarray
set -- "${myarray[@]}"
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
, twice. Useless use of ls and sort (globbing already
gives names in sorted order, and printf as a built-in is more efficient
than ls at listing one name per line). Why not:
sort -n $(printf %s\\n ../usage-* | tail -n1) | \
tail -n $(wc -l < template) > top_usage
> cat template top_us
e' to work; there are just
too many pitfalls and buggy shell implementations with differing
interpretations to ever expect it to be useful, even if there is a
standardized documentation for how it should behave, and even if bash
has (finally) caught up to the standards.
--
Eric Blake ebl...@
i
0
Even though we called set -e twice (both in the parent and in the
subshell), the fact that the subshell exists in a context where -e is
ignored (the condition of an if statement), there is nothing we can do
in the subshell to re-enable -e.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
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
t meets your
needs, before making it part of the next version of POSIX. It's a lot
easier to standardize something with a reference implementation, after all.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
function
rather than treating it as a normal input character.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
same fifo, then you have to use a subshell and
backgrounding in order to split the shell script into two processes, one
reading and one writing, and recognize that whichever of the parent or
subshell uses the fifo first will block until the counterpart process
opens the same fifo in the other direction.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
wint_t is always 32 bits, but you still have the issue that
it can be either signed or unsigned.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
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,
nywhere.
C.UTF-8 exists on Cygwin. But you are correct that...
> en_US.UTF-8 seems
> to perform acceptably for the latter.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
e values; but
using such values has unspecified results on any interface that takes a
wint_t. WEOF only has to be distinct, it does not have to be negative.
Don't think of it as 'wide-int', rather, think of it as 'the integral
type that both contains wchar_t and WEOF'. Y
OSIX but not C99 to handle the new
character types.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
On 02/22/2012 10:02 PM, Linda Walsh wrote:
>
>
> 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
t it gave me the before
> previous one.
> Is this a bug?
No, it is probably intentional. According to the documentation of
HISTCONTROL, if you have the ignorespace option set in your history
control, then use of leading whitespace exempts that command from being
tracked in history.
--
Eric
les. That's the only sane approach.
>
> Or show me how without using variables
> to do this
> test=test\'string
>
> [ "${test}" = "${test//"'"/"'"}" ] || exit 999
exit 999 is pointless. It is the same as exit 231 on some shells, and
according to POSIX, it is allowed to be a syntax error in other shells.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
not, quit complaining) that would add a new shopt, off by default, to
allow your desired alternate behavior. But I won't write such a patch,
and if such a patch is written, I won't use it, because I'm already used
to the POSIX behavior.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
specified by POSIX. So the question becomes whether
it is smarter to follow the rules for ${test+...} or for ${test%...}
(alas, POSIX does indeed have different rules for determining how " is
treated and how '}' is found in those two setups).
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
> of the stat structure specified in POSIX.1-2008. The patch included
>> shouls add the comparision of the nanosecond timestamps.
>
> Thanks for the report. Unfortunately, the way different versions of Unix
> name the `struct timespec' members of struct stat v
th approaches will misbehave if HOME is a root directory
(/ or //), where you _don't_ want to strip trailing slashes. So you
really want:
case $HOME in
*[^/]* ) HOME=${HOME%${HOME##*[^/]}} ;;
esac
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
On 03/13/2012 09:27 AM, Eric Blake wrote:
> Be aware that both approaches will misbehave if HOME is a root directory
> (/ or //), where you _don't_ want to strip trailing slashes. So you
> really want:
>
> case $HOME in
> *[^/]* ) HOME=${HOME%${HOME##*[^/]}} ;;
>
On 03/13/2012 09:47 AM, dethrophes wrote:
> Am 13.03.2012 16:42, schrieb Eric Blake:
>> On 03/13/2012 09:27 AM, Eric Blake wrote:
>>> Be aware that both approaches will misbehave if HOME is a root directory
>>> (/ or //), where you _don't_ want to strip trailing
performing negation, but other shells treat ^
literally). Additionally, since POSIX requires tilde-expansion to occur
on the word after 'case', you can write this as:
case ~ in
*[!/]* ) HOME=${HOME%${HOME##*[!/]}} ;;
/ | // ) ;;
*) HOME=/ ;;
esac
--
Eric Blake ebl...
arate
> aseparate
> $ atogether
> atogether
> $ ftogether
> bash: atogether: command not found
This behavior is expected, and not a bug.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
even older, on SunOS 4, you could make '/bin/sh -n' go
into an infinite loop on a script as simple a while loop that never
executes. More recently, modern ksh '-n' warns about every suspicious
construct, such as complaining about `` instead of $(). And don't ever
try
quoted the ' characters by surrounding the overall argument
in "".
> #
> # This is non-standard/unexpected behaviour.
>
> echo $@
Bug in your script - you generally want to use "$@", not $@, as the
former replays the positional parameters exactly, while the lat
say whether it's
right or wrong; you can only say whether it behaves as bash documented
it to behave.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
X 2001 already allows RRI as part of
its recognition that the decision made in POSIX 1992 causes pain when
coupled with poorly-written locale definitions.
For example, here is an RRI patch for gnulib:
https://lists.gnu.org/archive/html/bug-gnulib/2012-04/msg00185.html
--
Eric Blake ebl.
ranges
are currently unspecified in all but the C locale; the RRI project is
attempting to make it sane across all locales within the scope of GNU
programs, but it takes time to write and approve the patches necessary
to get to that point.
--
Eric Blake ebl...@redhat.com+1-919-301-3
--
> Seems pretty clear -- regex's aren't exempt from collating order, they
> depend on it...
Only on platforms where libc has chosen to provide an extension beyond
POSIX, and where GNU programs have not further overridden things to
avoid the unexpected glibc semantics.
--
w.php?id=375
at which point, the use of == would be required to work.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
d**) would be better if bash chose
> to fail, while executing in POSIX mode, in this case.
Sounds like you want debian's 'posh', which is even stricter than
'dash', and excellent for pointing out use of extensions by failing
loudly at any encountered extension
On 06/07/2012 03:22 PM, Linda Walsh wrote:
> This isn't a matter of preference... its a real bug.
>
> Ex:
> $ ls $HOME/bin
> "ls: cannot access $HOME/bin: No such file or directory"
Yes, we know. Ergo patch 29:
https://lists.gnu.org/archive/html/bug-bash/2012-05
the
only recovery possible after detecting stack overflow is a graceful
message and exit unless you go to extreme lengths to block signals
around every call to malloc or any other library function that grabs a lock.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library
. At least on AIX, ksh and sh do so.
Only because they haven't been patched to obey POSIX yet.
>
> * The average shell programmer probably seldomly encounters
> the difference, because it rarely matters.
Actually, the average shell programmer should avoid 'set -e', be
'tc1-2008' tag).
>
> Thanks for pointing to that issue record.
> Is this part of the standard yet?
Assuming balloting goes well, it will be later this year, but bash
proactively already implemented it.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
inux ubuntu 12.04) ?
Yep - upgrade to bash 4.2.29 (that is, patchlevel 2 is missing the fix
in patchlevel 29 that restores the behavior you want).
ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-029
This topic comes up frequently on this list.
--
Eric Blake ebl...@redhat.com+1-919-301-32
havior.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ep, and that is correct behavior as mandated by POSIX.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
requires that '.' is not part
of a valid variable name. Just because ksh allows it as an extension to
POSIX does not mean that bash has to do likewise.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
rameter
is substituted.
It's a shame that the form ${parameter-word} is not called out more
directly in a form easy to search for, and that you have to read in two
places to piece things together yourself; but it IS supported and
documented.
--
Eric Blake ebl...@redhat.c
onforms to POSIX.
>
> Is any way to force "set -e" to work even in such cases?
No, it is already working as specified (just not the way you want).
>
> If this question asked 1000 times, why not to answer in FAQ (
> http://tiswww.case.edu/php/chet/bash/FAQ)?
http://mywiki.w
n bodies, but only inside
function bodies where the function call appears inside a context where
'set -e' is ignored (such as in the condition of 'if'). It's
non-intuitive, and therefore my advice is to never rely on 'set -e'.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
at line 1: `;;' unexpected
but not in mksh or dash:
# dash -c 'echo $(for x in whatever; do case y in *) echo 42;; esac; done) '
42
Looks like you found a real bug, but a tough one to fix if even ksh gets
it wrong.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvirt
t; open paren as syntactic sugar...
POSIX has always required an optional open paren to case patterns,
thanks to ksh; but it hasn't been portable to all shells until recently
(among others, Solaris /bin/sh will fail if you try it, but then again,
that's not a POSIX shell).
--
E
' -DCONF_VENDOR='pc'
> -DLOCALEDIR='/usr/$
> uname output: CYGWIN_NT-6.1 Machine-name 1.7.16(0.262/5/3) 2012-07-20 22:55
> i686 Cygwin
> Machine Type: i686-pc-cygwin
Have you reproduced this on non-cygwin platforms, or should you be
reporting this to the cygwin fo
very easy to
detect user-induced stack overflow with a minimum amount of additional
code. Both GNU m4 and gawk have used libsigsegv to implement nicer
error handling in this situation, so maybe it is worth copying code from
these projects into bash.
--
Eric Blake ebl...@redhat.com+1-91
g type converted according to the integer promotions.
and are the two main headers that are this
explicit about various macros being suitable for use in preprocessor
arithmetic, and preprocessor arithmetic cannot use casts or sizeof.
--
Eric Blake ebl...@redhat.com+1-919-301-3266
Libvir
On 10/05/2012 10:17 AM, Eric Blake wrote:
> On 10/05/2012 10:06 AM, Andreas Schwab wrote:
>> Chet Ramey writes:
>>
>>> Why would you say there's a restriction against using casts or sizeof in
>>> a macro like this?
>>
>> Because it must e
On 10/05/2012 10:50 AM, Eric Blake wrote:
>> and are the two main headers that are this
>> explicit about various macros being suitable for use in preprocessor
>> arithmetic, and preprocessor arithmetic cannot use casts or sizeof.
>
> And I think this is a bug in POSI
> ok.
Consider:
$ f() { return 2; }
$ ! f
$ echo $? ${PIPESTATUS[@]}
0 2
If PIPESTATUS included the effect of !, you would only ever be able to
see 0 or 1; but by having it be the uninverted status, you can see the
full 0-255 of the actual command prior to the inversion.
--
Eric Blake ebl...@
tab.[ch]) that must exist in the
tarball but can be safe to omit from git, if we are willing to assume
that developers building from git can be assumed to have the maintainer
tools. Treating git like building from a tarball is not necessarily
worth the headache.
--
Eric Blake eblake redhat com
you are in a context that ignores 'set -e', the historical
behavior is that there is no further way to turn it back on, for that
entire body of code in the ignored context. That's how it was done 30
years ago, before shell functions were really thought about, and we are
stu
n the common case)
than what the man pages says is possible in the more comprehensive case.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
eam binary from
your distro of choice).
You can also look at git://git.sv.gnu.org/bash.git, but it is a bit
behind; Chet has only pushed master up to patch 39 instead of patch 42.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
d manner for specifing orthogonal locales for
transliterating floating point from one representation to another seems
like a missing feature in POSIX.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ix mode does not require bash to instantly
prohibit extensions. POSIX intentionally allows for implementations to
provide extensions, and 'export -n' is one of bash's extensions.
There's no bug here, since leaving the extension always enabled does not
conflict with subset of
t; 1
I tested with posh 0.10.2; looks like this is an upstream regression in
behavior (although you'd have to ask posh developers whether the
regression is intentional):
$ posh -c 'exit 10'; echo $?
10
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualizati
y it seems to be impossible to e.g. print "-n" with the
> builtin
> echo witout any extra characters.
>
> Repeat-By:
> Invoke echo with the string "-n" being the string to be outputted.
> Expected output: "-n"
NACK.
shall not recognize the "--" argument in the manner
>> specified by Guideline 10 of XBD Utility Syntax Guidelines ; "--"
>> shall be recognized as a string operand.
>
> Perhaps this is worth adjusting unless POSIXLY_CORRECT?
No. Existing scripts alr
eval.
> else
> # No, $1 doesn't contain slash
> eval $1="${!1}"
> fi
> fi
> } # __expand_tilde_by_ref()
>
> ---8<---
$ foo='~;$(date)'
$ __expand_tilde_by_ref foo
bash: Thu: command not found...
If you're going to use eval, you MUST SANITIZE THE INPUT.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
the
> same way that bash performs tilde expansions, and that it was safe to
> ignore tilde expansions in inputs of the form "hostname:~username/pathname"
> and "variable=~username/pathname".)
But those more complex problems should still be solvable (as an
.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13.
Thos rules state that any character in the pattern that is quoted
(which \x is) matches itself, and 'x' matches 'x'.
> ksh: yes
correct
> mksh: no
bug
> posh: no
bug
> zsh: no
bug
&g
/html/help-bash/2013-04/msg00031.html
In particular, that thread points out:
http://mywiki.wooledge.org/BashFAQ/050
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
st to make our lives bit more
> comfortable?
Did you not read the FAQ entry, which mentions that a DEBUG trap that
collects $BASH_COMMAND (both bash extensions) exists as the nicest way
to trace what your script did, and can be used in a way that doesn't
interfere with the stdout/stderr that
ill providing ABI compatibility for older applications to
continue to run even without recompilation).
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Whether various shells have extensions that attempt to treat the command
as arithmetic or fall back to command substitution is a different
matter, since POSIX doesn't forbid extensions.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
bc. Until that bug is solved, we can work around
> it by providing replacement code.
Working around the bug by recompiling 20 separate apps is more painful
and less maintainable than just fixing the bug at the source. Please,
add your opinions to the glibc list to help convince the glibc lo
s, and no one else has ever
tried working around that bug.
SUA is a rather wimpy porting platform. Have you considered trying
Cygwin instead (see cygwin.com), so that you don't have to put up with
all the non-conforming incomplete POSIX garbage that Microsoft is
pushing with their SUA platfor
-SMSBOOT-sources-/*
cd ./--SMSBOOT-sources-/*
This is true for most unix-y commands, not just cd.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
speak louder than words; right now, your insistence on reviving
dead threads and complaining that no one is writing the patches is
rather annoying. Quit beating a dead horse; if you want action, start
proposing patches rather than rants.
--
Eric Blake eblake redhat com+1-919-301-3266
L
nstance where -a is parsed as a binary operator (ie.
it was parsed as "\( ! \) -a \( stuff.txt \)", not "! \( -a stuff.txt
\)". -a as a binary operator is required by POSIX for XSI, therefore it
takes priority over -a as a unary operator as a bash extension.
--
Eric Blake e
>>
>> Fedora 18, bash 4.2.45(1)-release
>> OSX, 3.2.48(1)-release
>
> Also occurs in 4.3.0-beta.
Which is good, because it's not a bug.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[moving to the coreutils list, as coreutils has a bug here]
On 09/05/2013 10:33 AM, Eric Blake wrote:
> On 09/04/2013 11:06 PM, kneuf...@gmail.com wrote:
>> According to the man page, [ -a ] and [ -e ] should have the same behaviour.
>
> Not a bug. -a behaves like -e
ample
$ echo [warning]
[warning]
$ touch a
$ echo [warning]
a
$ touch n
$ echo [warning]
a n
$ echo "[warning]"
[warning]
This is not a bug in bash, but in your script.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ll intents and purposes, if you don't have permission to stat a
file, then it may as well not exist. Treating permission denied as not
existing is perfectly logical.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
On 10/03/2013 04:19 PM, vic...@vsespb.ru wrote:
> пятница, 4 октября 2013 г., 2:11:51 UTC+4 пользователь Eric Blake написал:
>> For all intents and purposes
>
> What about the following intent:
> -if file exists, backup file
> -throw an error in case of permission problem (t
d write your
script to error out if a user feeds you a name that you cannot access.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
f you care about the difference between ENOENT and EPERM, then write
your program in C or other language, not shell. There is no way for the
shell to tell you what errno the OS returned. The shell is not going to
change just because of your request.
--
Eric Blake eblake redhat com+1-919-
dump upon stack overflow
(although gracefully recovering from overflow is a MUCH harder task,
unless you can prove that overflow will never happen in the middle of a
function such as malloc).
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
s
sing "//" as the root of the
"//system/share" path notation for accessing other computers on the same
network. While Linux happens to have an implementation definition that
"//" and "/" are identical, bash has chosen that it is easier to always
handle "//"
in addition to its
current dynamic scoping) for that to work. So in the meantime, yes,
bash really does behave non-intuitively when in posix mode.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
pattern, but I know it is limited in functionality. I.e.:
>
> ls !($(echo *+(-IGN-)*|tr " " "|"))
for $var in *; do
case $var in
*-IGN-*) ;;
*) # whatever you wanted on the remaining files
;;
esac
done
--
Eric Blake eblake redhat com+1-919
7;luck'?
> ---
> Slight improvement -- but still not a direct bash pattern:
>
> !($(printf "%s|" *+(-IGN-)*))
What's wrong with:
!(*-IGN-*)
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
ve shell is one thing (and in
fact, zsh has done that in their default mode), but for scripting, you
would break LOTS of existing scripts if you changed the default behavior
of word splitting.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
al problem with libpcre is that it is bloat: bash is already
bigger than dash, and requiring yet another third party library will
further swing the balance away from bash for the systems that want their
POSIX 'sh' to be small rather than bloated.
--
Eric Blake eblake redhat com+1-
t be used
often enough to provide more gains than the cost of learning it. In
particular, I will refuse to use any system that requires a web browser
in order to submit or modify status of a bug (ie. any GOOD bug tracker
system needs to still interact with an email front-end).
--
Eric Blake eblake
ell shall repeat the search to find the new
location for the utility, if any."
So the three ways to reset a hash without resorting to the non-portable
shopt are 'hash -r', 'PATH=$PATH', or causing lookup to fail - but bash
is not honoring the third way by default
on for this one; probably just extremely old legacy
code back in the day when various libc were not compatible to the
restrictions added in later versions of the C standard.
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
tf.c: if (tmp_roomptr != NULL)
free (tmp_roomptr);
>
> Either way, I find both of these code snippets very redundant.
As do I, but I'm not the one in charge of deciding whether to clean the
code base up to satisfy the useless-if-before-free script.
--
Eric Blake eblak
the out-of-bounds access will read unspecified memory, but the result of
that read will either be 0 (short-circuiting the bounds check) or
non-zero where the bounds check fails, so even if you leave the
undefined behavior in place, in practice you will usually get the same
result as the defined behavior
On 04/14/2014 09:26 AM, Andreas Schwab wrote:
> Eric Blake writes:
>
>> It silences static code checkers and avoids undefined C behavior.
>>
>> Also, if invokers[] is allocated such that it ends on the end of a page
>> boundary (such as might be the case under cert
On 04/14/2014 09:35 AM, Andreas Schwab wrote:
> Eric Blake writes:
>
>> In that case, the index check is dead code,
>
> No. You don't understand.
Fair enough. But my point remains to the original poster: a patch
without justification is unlikely to be applied. Doc
101 - 200 of 698 matches
Mail list logo