Pierre Gaston writes:
> bash-4.0$ set +H;!((3))
> bash: !: event not found
That command line was never executed because history expansion failed.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now fo
rminating NUL) if the buffer would be big enough.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Chet Ramey writes:
> I try to write to the current (well, ten-year-old) standards.
Nothing wrong with that. gnulib has a few macros to detect such
problematic implementations that you could borrow from.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 5
se read -r -d '' to get really unmangled input.)
> but if I try to "output" $'\x00', I can't.
$ printf "\x00\n" | cat -A
^@
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Antonio Macchi writes:
> but, as you can see, it does not work only for two binary chars
The argument space is not suitable for binary I/O.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for s
Antonio Macchi writes:
>> $ printf "\x00\n" | cat -A
>> ^@
>
> it works, so why...
>
> $ printf $'\x00' | cat -A
> $
>
> ... not?
The answer is in the part you neglected to read.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key f
Bernd Eggink writes:
> Am 28.11.2009 06:35, schrieb r...@saturn.syslang.net:
>>
>> Description:
>> use of $(< filename | program) does not work. It either should or it
>> should be properly documented.
>> The problem also happens on bash4.
>>
>> Repeat-By:
>>
>> qq=$(< /etc/pass
"Chris F.A. Johnson" writes:
>This works with the output of commands, too:
>
> IFS=- read year month day <<.
> $(date +%Y-%m-%d)
> .
The disadvantage is that the command is executed synchronously.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fi
Greg Wooledge writes:
> It's just a positional-parameter variant of:
>
> files=("/tmp/emptydir"/*)
> if [[ -e ${files[0]} ]] ...
This will still fail if the first file happens to be a dangling symlink.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key f
"Matias A. Fonzo" writes:
> A solution to check the broken symlink is:
>
> [ -e "foo" -o -L "foo" -a ! -e "foo" ]
In which way is the last check not redundant?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7
sider broken symlinks just
>> like anything else. A broken symlink would be a bug in my code and I want to
>> detect it ASAP.
>>
>>
>> > Because, if the symlink is not broken, the regular file "exists" ( -e ).
>>
>> Please forget about corre
"Matias A. Fonzo" writes:
> On Tue, 15 Dec 2009 10:37:36 +0100
> Andreas Schwab wrote:
>
>> "Matias A. Fonzo" writes:
>>
>> > On Mon, 14 Dec 2009 12:21:12 +
>> > Marc Herbert wrote:
>> >
>> >> Matias A.
What does that mean?
TRACE: pid 17502: mark_dead_jobs_as_notified: ndeadproc (0) != js.c_reaped (14)
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Chet Ramey writes:
> On Dec 25, 2009, at 11:43 AM, Andreas Schwab
> wrote:
>
>> What does that mean?
>>
>
> TRACE: pid 17502: mark_dead_jobs_as_notified: ndeadproc (0) != js.c_reaped
> (14)
>
> It's a debugging/informational message. ndeadproc is a coun
and which is resolved
> relative to your current working directory.
>
> $PWD is always an absolute pathname.
There are two conditions: 1. absolute pathname and 2. to the current
directory. The second one is violated.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Jan Schampera writes:
> It's a character like 'A' or 'B'.
'A' and 'B' are letters, $'\r' is whitespace.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
home', the second matches nothing. The only difference
> is * vs. + AFAICT, both expressions should match 'home'.
"[^/]*" matches the null string at the start of '/home/', and there is
no reason for the matcher to try another match.
Andreas.
--
Andreas Schwab
s a pair of quotes (${link#*"$remove"}). Testcase: 'x[a]' -> 'y'.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
the name `c'. Surely they behave differently. Alias substitution is a
pure textual substution that changes the text to be parsed.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-4.1
-L/usr/src/packages/BUILD/bash-4.1/../readline-6.1
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc'
-DCONF_OSTYPE='linux-gnu' -DCONF_M
l2
> $2 = -1
>
> which is strange.
Not at all. Overflow invokes undefined behaviour.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Roman Rakus writes:
> But why there is no overflow on 32bit system?
Why do you think so?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
t;
> As long as we're being exhaustively thorough...
>
> ... or cd "$_" to reuse the last word of the previous command.
> ... or cd !$to reuse the last word in csh-style history expansion.
... or cd M-. (type Meta-period)
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
ease
>>
>> Description:
>> Typing 'declare -A a=b' crashes bash with a segmentation fault.
>> Repeat-By:
>> Type 'declare -A a=b'.
>
>I can confirm that in 4.0, but it works in 4.1
Not really:
$ declare -A a=b; unset a
*** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Andreas Schwab writes:
> $ declare -A a=b; unset a
> *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
And the obvious patch:
--- bash-4.1/builtins/declare.def.~1~ 2009-11-26 01:42:00.0 +0100
+++ bash-4.1/builtins/declare.def 2010-04-09
y the $string was still splitted into words since
> it's double quoted. Anyone can give a reasonable explanation?
It's not "$string" that was split, but rather $i.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
"Clark J. Wang" writes:
> And flock can only run external commands, it cannot do with things like bash
> builtins or functions.
You can also pass flock a file descriptor, which allows you to define a
critical region inside your script.
Andreas.
--
Andreas Schwab, sch...@li
ively, enclose the whole script in { ... } and add the pipe
after that.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
if (t)
> - strcpy (t_string, t + 1);
> + memmove (t_string, t + 1, sizeof(t));
Surely you want strlen.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Jan Schampera writes:
> If this is not a bug, what's the reason behind this?
Probably because a command name containing a slash is never looked up on
$PATH, thus never remembered and put in the hash table.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 5
Farkas Levente writes:
> hi,
> =~ no longer working in bash. just try this little line:
> -
> if [[ "abc" =~ "abc.*" ]]; then echo inside; else echo outside; fi
> -
See question E14 in the Bash FAQ.
mika.p.maki...@webinfo.fi writes:
> user needs to write command mv /home/user/a/b/c/d/e/file
> /home/user/a/b/c/d/e/fileB.
$ mv /home/user/a/b/c/d/e/{file,fileB}
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED
; ### END OF THE SCRIPT ###
>
> It does not work as I expected. The running script was not terminated after
> 5 seconds. So what's wrong here?
The shell is waiting for foreground process (sleep) to finish. During
this time no other process will be started by the shell.
Andreas.
Bob Proulx writes:
> For an executable script I use no suffix at all. It matters not if
> the script is a bash script, sh, ksh, perl, ruby, or whatever.
Assuming it uses the appropriate shebang.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942
and1
> $ date; command2
>
> Is there an easy way to do that?
You can get from the history output, if you set HISTTIMEFORMAT.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
"Dr. Werner Fink" writes:
> a=$((/bin/cat|wc -l) < a
> b
> EOF
> )
Useless subshell.
a=$({ /bin/cat | wc -l; } <
Chet Ramey writes:
> If en_US happens to be the system's default locale, of course. You
> can only be sure that you'll get ASCII sorting order if you set
> LANG=C.
No, you need to set LC_ALL=C, because LANG has the lowest priority.
Andreas.
--
Andreas Schwab, sch...@lin
Bernd Eggink writes:
> "If the function reserved word is supplied, the parentheses are
> optional."
While the grammer has the right rules for this the handling inside of
special_case_tokens isn't right up to it, it only recognizes '{'
following 'function
koe...@science-computing.de writes:
> empty line(s) at the end of quoted command subsitutions are missing:
That is not a bug, but a feature. Command subsitution generally strips
trailing newlines from the output of the command. If you want the
complete output use a pipe.
Andreas.
--
Andr
ubshell enough time to
acutally execute the sleep command.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Bernd Eggink writes:
> eval "function $name
Don't use function, use "$name ()" instead.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Linda Walsh writes:
> I would prefer this work:
>
> a="h."
>
> if [[ "hi" =~ "$a" ]];
This works (both with and without compat31):
[[ "hi" =~ $a ]] && echo matches
(It doesn't matter how you quote the lhs, anyway.)
And
Bob Proulx writes:
> Neither of those produce any output.
>
> $ printf '%d\n' ""
> 0
Since the command substitution is not quoted the result of the expansion
is subject to field splitting, thus expands to nothing at all instead of
a single empty argument.
A
Linda Walsh writes:
> Or, why should double quotes be functionally the same as single quotes
> in that situation?
Handling it different from glob meta characters would make it even more
special.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942
t matches how $* works),
> and that the man page is simply misleading.
Parameter expansion and word splitting are two separate steps. The
quote above only talks about the former.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Greg Wooledge writes:
> On Tue, Aug 10, 2010 at 04:15:30PM +0200, Andreas Schwab wrote:
>> Greg Wooledge writes:
>>
>> > The 4.1 man page says:
>> >
>> > ${!prefix*}
>> > ${!pre...@}
>> >Nam
Dennis Williamson writes:
> It's the responsibility of your code to put an ASCII character after
> the \c. There's no way for Bash to guess that the 0xD0 is part of a
> Unicode character or the byte that it is.
It can, by using mbrlen.
Andreas.
--
Andreas Schwab, sch...
Dmitry Groshev writes:
> Everything between 0x80 and 0xFF is part of (possibly invalid)
> multibyte sequence in UTF-8.
Who says that the string is UTF-8 encoded?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED
Marc Herbert writes:
>for a in $(echo 1 2) ; do echo "x${a}x"; done
This applies word splitting on the expansion of $(echo 1 2).
> a=$(echo 1 2); echo "x${a}x"
This doesn't.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint =
se in an assignment.
> Quoting makes a difference in some places but no difference in other
> places (because of some kind of "implicit quoting").
There is a big difference between
$ a=";"
and
$ a=;
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint =
; is a nice feature in programming language
> design but extremely low-priority compared to consistency.
There is no inconsistency here.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
al meaning of a character.
> It is NOT the same as double quotes not allowing *file glob
> expansion*.
Globbing is not only about expansion, it is also about matching.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Ken Irving writes:
> I'm guessing your $(which rm) is intended to avoid calling rm(), but maybe
> \rm
> would do the same thing? No, that still calls the function... I'm not sure
> how to do that.
$ command rm
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG
urprised. :->
syntax error near unexpected token `{su}'
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
mmands and
> do proper handling (emulate those which are known and give
> error if one's still missing).
>
> Is there any way to do this easily ?
Try using the DEBUG trap.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D
Cristian Zoicas writes:
> a) "readonly" and "declare -r" do not behave the same way;
When used in a function, `declare' makes NAMEs local, as with the `local'
command.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58
..@axel-asus plugins]$ declare -A foo=( $(func) )
$ declare -A foo=('[a]=5')
bash: foo: [a]=5: must use subscript when assigning associative array
$ eval "declare -A foo=($(echo '[a]=5'))"; echo ${foo[a]}
5
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint
"Chris F.A. Johnson" writes:
> On Fri, 22 Oct 2010, Andreas Schwab wrote:
>
>> Axel writes:
>>
>>> After your answer, I checked and I think the error message is not
>>> related to the variable name collision :
>>>
>>> [a...@
then this does not happen. Any explanations/ideas/fixes/etc?
Thanks
Andreas
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
Hi Chet,
I'm afraid I'm not quite sure what you mean. I assume it's installed
because partial names are being completed. Also, I forgot to mention
that I've encountered this problem on both RH Linux 9.0 and OS 10.3.
Andreas
Chet Ramey wrote:
I apologize if this is old hat
The first command gave output. Does this mean that command-line
completion was not active? If yes, how come I could complete paths before?
Andreas
Chet Ramey wrote:
Andreas Haselbacher wrote:
Hi Chet,
I'm afraid I'm not quite sure what you mean. I assume it's installed
becaus
ated to my problem.
Andreas
Paul Jarc wrote:
Andreas Haselbacher <[EMAIL PROTECTED]> wrote:
The first command gave output. Does this mean that command-line
completion was not active?
It means that there were extra completion functions in use, overriding
the default completion beha
:~/FOO# vi pr-bash: __reassemble_comp_words_by_ref: maximum function
> nesting level exceeded (4)
In which way is this a bug? AFAICT, FUNCNEST is doing its job.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
arrayfunc.c:valid_array_subscript when
you pass VA_NOEXPAND. */
-static char *
+static int
expr_skipsubscript (vp, cp)
char *vp, *cp;
{
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
t do that either for indexed array
subscripts, since they are arithmetic expressions.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Jan 07 2019, Keith Thompson wrote:
> I suggest documenting this behavior. It would be nice to be able to
> depend on the exact format, for example that ${EPOCHREALTIME/*./}
> is always exactly 6 digits long.
ms=${EPOCHREALTIME/*./}00
ms=${ms:0:6}
Andreas.
--
Andreas Schwab,
fact that := is used is irrelevant.
> shell option is enabled, bash-5.0 emits a "no match: "
At this point it is a glob pattern, not a regexp.
> echo ${TESTPATTERN}
If you don't want filename expansion, use quotes.
Andreas.
--
Andreas Schwab, SUSE Labs, sch.
which
> starts with a '.' character.
For the same reason `*.' doesn't match `.'. Making `@()' work differently
from `*' would be surprising.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Jan 20 2019, Andrey Butirsky wrote:
> |$ unset 1a ||
> ||bash: unset: `1a': not a valid identifier
Use `unset -f'.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for
some external devices.
No, that is what volatile means. The register keyword is just an
optimisation hint, and is mostly ignored by the compiler.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Feb 06 2019, Peng Yu wrote:
> If it is ignored anyway, why "register" is used in many places in the
> code? Thanks.
Because compilers were dumb in the old days.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D
fference for me:
>
> BASH_CMDS
> DIRSTACK
> GROUPS
>
> Scalars that exhibit this issue:
>
> BASHPID
> BASH_COMMAND
> BASH_SUBSHELL
> COMP_WORDBREAKS
> HISTCMD
> LINENO
> RANDOM
> SECONDS
All these dynamic variables are displayed with values by declare -p
after the va
}.
> +declare -A @var{name}
> @end example
Perhaps it should be reformulated to avoid putting the example at the
end of the sentence.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: openbsd6.4
Compiler: cc
Compilation CFLAGS: -O2 -pipe -Wno-parentheses -Wno-format-security
uname output: OpenBSD eeyore.my.domain 6.4 GENERIC.MP#746 amd64
Machine Type: x86_64-unknown-openbsd6.4
Bash Version:
waits for a single job to terminate"
Even better, IMHO: "wait waits for the next job to terminate"
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Apr 10 2019, Daniel Kahn Gillmor wrote:
> data written to the local filesystem can be discovered by someone
> analyzing the disk controller data path, or by someone with access to
> the underlying storage medium.
Do you have swap enabled?
Andreas.
--
Andreas Schwab, SUSE
fork looks reasonable, even if only to make it
consistent with builtins.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
do grep -e "$(echo -n "$file" | sed 's/\$/\\$/g')"
> someinput; done
Use grep -F instead.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
mands in the history is temporarily suppressed. The
> thing is that enabling history with `set -o history' turns all of these
> things on.
But should the effect of `set -o history' be deferred until the end of
the temporary suppression?
Andreas.
--
Andreas Schwab, SUSE Labs, sch...
On Jul 12 2019, Chet Ramey wrote:
> I assume this means that bc doesn't use strtod.
Of course not, strtod doesn't parse arbitrary precision numbers.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
t; :123 *:
It is not portable, see the autoconf manual:
... is not portable, since not all shells properly understand
`"`..."..."...`"', for example Solaris 10 ksh:
$ foo="`echo " bar" | sed 's, ,,'`"
ksh: : cannot e
t;]="'"${foo["key"]}"' value2")'
This will break if ${foo["key"]} contains any of $ ` " \ .
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Jul 23 2019, Sam Liddicott wrote:
> It got closed in the parent. The lsof is running for the parent, the main
> process. /bin/echo has quit before the lsof runs.
When you run an external command the redirection is performed in the
child.
Andreas.
--
Andreas Schwab, SUSE Lab
On Sep 21 2019, "Christopher Chittleborough"
wrote:
> The command "help -s %" outputs
> %: job_spec [&]
> when it should output
> %: % job_spec [&]
> because the $SHORT_DOC for "%" in builtins/reserved.def is wrong.
A j
o real standard for this - NetBSD has deprecated the -depth
> operator (which never really was one) and replaced it by a -d option
> which makes much more sense (-depth never really was the right way to
> do it).
According to https://www.freebsd.org/cgi/man.cgi, find -d already
appeared
s different behaviour?
Because it's reset immediately before reading the next line with
readline.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Okt 07 2019, Greg Wooledge wrote:
> x=(1 2 3 4 5 -n '/*' 'hello world')
> for z in "${x[@]}"; do
> printf %s "$z"
> done
> echo
(IFS=; printf '%s\n' "${x[*]}")
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GP
t; and this may be surprising from just reading the documentation.
It also says:
Unless otherwise specified, primaries that operate on files follow sym-
bolic links and operate on the target of the link, rather than the link
itself.
Andreas.
--
Andreas Schwab, SUSE Labs,
erpolation). As you can see, if the user-specified command
> has a single quote, it will break this command unless escaped.
Just shell-quote the characters in the interpolated string, as you need
to do anyway for the other interpolated strings. Not doing this would
be a security bug waiting to
eaning within a bracket
>> expression.
>>
>
> Is this really what the standard says, because '\\' is not a character, but
> 2 characters. They could use "\\" but if a backslash is between single
> quotes, it loses its special meaning.
This is
On Dez 26 2019, Eric S. Raymond wrote:
> RFE: bash should have a TID varuable that returns the vakue of gettid(2).
Bash doesn't use threads, so $TID will always be the same as $BASHPID.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 0
it points to.
But filename expansion is not operating on literal strings, it is
operating on existing filesystem objects.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
ved words are only recognized at the start of a
command, before any expansions. For the same reason a compound command
cannot be preceded by redirections.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now
See stdbuf(1).
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
laced by "the
> first word of a command (see SHELL GRAMMAR below)", which helps.
Isn't (4) also a subset of (1)?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
kefile:326: installdirs-data-yes] Error 127
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
e
126.
And that's what bash does.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
On Jul 17 2020, Chet Ramey wrote:
> So Greg's advice is appropriate: find out why bison is looking for that
> file,
It is one of its installed files used during runtime.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E78
On Jul 27 2020, Lawrence Velázquez wrote:
> If word splitting were not performed in compound assignments, this...
>
> foo=(a b c)
>
> ...would not work.
This is not true. Field splitting is only relevant for words generated
by other expansions, not for literal tokens.
Andrea
<(filter)
The reason for using a process substitution is so that the loop can set
shell variables.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
501 - 600 of 818 matches
Mail list logo