for multi-line commands that happen to contain matches for
re.
$ (sleep 100; printf $'\n[100]\n') &
--
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
...
done
... as opposed to the "for" command on the form
for i in some list; do
...
done
--
Andreas (Kusalananda) Kähäri
Uppsala, Sweden
.
rrors only (default)
-quiet show informational messages on the terminal and run in the fore-
ground
-verbose
provide a running commentary of what xclip is doing
--
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."
es) works fine in the original pipeline, without
> needing the redirect to /dev/null:
>
> $ echo foo | tee >(xsel -i) | tr o x
> fxx
That's because xsel is properly daemonizing itself, disconnecting from
its stdin/out/err.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprin
On Nov 25 2023, Emanuele Torre wrote:
> But the bash executable still does not contain the legal_ symbols:
If bash does not reference any of the symbols in lib/sh/compat.c there
is nothing pulling it in.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2
et the $0 special parameter.
$ bash -c 'echo $0 $2 $1' foo bar mumble
foo mumble bar
--
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; content in a single string variable, which is a questionable idea in
> most programs.
For interactive use, $(< ...) is convenient and less verbose than the
alternatives.
--
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 Dez 21 2023, Britton Kerin wrote:
> But if I do `complete git' at a new shell
That overwrites the completion spec for git (with the empty set, ie. no
completions at all). If you want to print existing completions, use
complete -p [NAME...].
--
Andreas Schwab, sch...@linux-m68k.org
On Jan 29 2024, Robert Elz wrote:
> I always wondered why the option was 'n'
n = next?
--
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."
s doing exactly what it is documented to do, that is do all
of the shell word expansions.
--
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."
ion
further.
> I think that escaping is needed after quote removal in shell-expand-line.
The function is called shell-expand-line, not
shell-expand-and-requote-line.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"An
On Feb 21 2024, Christian Convey wrote:
> E.g., for limiting virtual memory to 8 gigabytes, the invocation is "ulimit
> -v 8388608", rather than something like "ulimit -v 8gb".
Or ulimit -v $((8*1024*1024))
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerp
On Feb 29 2024, Martin D Kealey wrote:
> Should octal or hexadecimal be allowed (since they're easier to express
> powers of two)?
For this, $(( )) already provides enough support.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D
confuse the two is
a different matter, but the documentation is correct for the current
implementation (which mimics the ksh shell with regards to the unary
"-a" operator).
--
Andreas (Kusalananda) Kähäri
Uppsala, Sweden
.
not performed,
> because the "$2 is a binary primary" check comes first. This is how
> POSIX documents it.
FWIW, ksh parses it the other way round:
$ ksh93 -c '[ ! -a /tmp ]; echo $?; [ . -a /tmp ]; echo $?; [ - -a /tmp ]; echo
$?'
1
0
ksh93: [: -: unknown operator
2
--
And
On Apr 08 2024, Greg Wooledge wrote:
> Now imagine what happens if the shell is killed by a SIGKILL, or if
> the system simply crashes during the script's execution. The script
> is left with altered permissions.
Or the script is executed by more than one process at the same time
ile.c:438
> #6 0x0045a579 in maybe_save_shell_history () at bashhist.c:425
> #7 0x0045277b in termsig_handler (sig=11) at sig.c:525
> #8
This is definitely a bug in bash. It calls functions in the signal
handler that are not async-signal-safe.
Andreas.
--
Andreas Schwab, sch...@linux
g
> find /test -type d ! -wholename "/test"
> $ echo "$($prog)"
> (/test shown)
> (more results in original mail)
Do "set -x" and note the executed commands.
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:
> Crap, libncurses5-dev isn't installed.
If you have neither libncurses nor libtermap then configure will use the
included termacp.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
&quo
"Clark J. Wang" writes:
> Following command also prints nothing, confused :(
>
> for ((i = 0; i < 10; ++i)); do echo -n " $i"; done | while read v; do echo
> $v; done
$ printf . | { read v; echo $?; }
1
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
G
"john.ruckstuhl" writes:
> In bash, a comparison inside "[["/"]]" is lexicographic not numeric?
[[ ... ]] uses the same operators as test, so if you want numeric
comparison you need to use -gt, -lt, etc.
> Which part of the documentation would set me straigh
Dominic Raferd writes:
> Why does this happen? Is it 'by design'?
$ help let
[...]
Exit Status:
If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise..
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 0
Is it 'by design'?
>>
>> Yes. The same as for 'expr' which is standardized by POSIX to have the
>> same behavior.
>
> This is a design mistake: it trades a few characters for a lot of confusion.
You can always choose to ignore the exit status. The co
rs are being evaluated locally in ALL cases. Am
> I mis-understanding this concept or is there a problem in bash?
Try "set -x" to see exactly what is being executed.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 21
f a reserved
word, since they are only reconized where the first word of a command
can occur.
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."
e PS2 prompt.
>
> arc3:~$ help ()
>>
>
> Of course that has nothing to do with the 'help' builtin.
Of course it doesn't, since it just starts a function definition.
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."
d the file "..".
".." is not in any way special here. It is just a file that happens to
start with a dot.
> But if I use the expression ".*" in bash, I would expect from the
> behaviour of "*", that
> ".*" don't include the file
ince there was no
preceding command the exit status is zero. The extra argument is simply
ignored.
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."
Maarten Billemont writes:
> The comment is called a hashbang or shebang. It tells the kernel which
> program to start. Your script is passed over stdin to the interpreter.
No, it isn't, it's passed as the argument.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG
gt;When this option is on, if a simple command fails for any of the
A compound command is not a simple command. Only failing simple
commands cause the shell to exit.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4
com bash
> /tmp
Even better:
$ ssh example.com bash <<\EOF
cd /tmp && pwd
EOF
That avoids having to watch out for ' vs " quoting.
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."
Ralf Goertz writes:
> Why is 08 not tried to be interpreted as octal when *numerically* compared
> using test?
Because test does not know about octal for compatibility. Use [[ ... ]]
if you want to be closer to $((...)).
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key finge
Dennis Williamson writes:
> _CRed='\[\033[31m\]' #Red
> _CRST='\[\033[0m\]' #Reset
> _CBLD='\[\033[1m\]' #Bold
_CRed="\\[$(tput setaf 1)\\]"
_CRST="\\[$(tput sgr0)\\]"
_CBLD="\\[$(tput bold)\\]"
Andreas.
--
Andreas Sc
)T\n" $SECS
> printf "%(%e-%b-%Y %T %Z)T\n" $SECS # added %Z
>
> result:
>
> 15:09:15
> 30-May-2010 15:09:15 CDT
>
> printf.right says it should be "16:09:15" in both cases. Note that the
> %Z I added outputs CDT.
bash fails to put TZ in its
"Clark J. Wang" writes:
> I think char `:' is not special in bash.
$ printf "%q\n" "$COMP_WORDBREAKS"
$' \t\n"\'><=;|&(:'
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:
> On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab wrote:
>
>> "Clark J. Wang" writes:
>>
>> > I think char `:' is not special in bash.
>>
>> $ printf "%q\n" "$COMP_WORDBREAKS"
>> $&
"Clark J. Wang" writes:
> On Thu, Feb 17, 2011 at 6:19 PM, Andreas Schwab wrote:
>
>> "Clark J. Wang" writes:
>>
>> > On Thu, Feb 17, 2011 at 5:00 PM, Andreas Schwab > >wrote:
>> >
>> >> "Clark J. Wang" write
] && echo 4 # quoted
> bash-4.2# bash42 quoted-pattern.sh
> 1
> 3
> bash-4.2#
>
> From my understanding 1 2 3 4 should all be printed out.
"aa" contains no period, so why should it be matched?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fing
r not.
The rule is the same as everywhere: a quoted character loses its special
meaning.
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:
> That's the way it's implemented but that does not mean that's reasonable.
So how do you suggest to solve that?
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276
s sentinel word is considered "quoting". And because the
> sentinel word is "quoted", parameter expansions in the body are not done.
The backslash does not quote the here document, it quotes the first
character of the delimiter. A (unquoted) backslash always quotes
exa
Maarten Billemont writes:
> Why are we escaping all word break characters? rm file:name and rm file\:name
> are effectively identical, I'm not sure I see the need for escaping it.
How do you differentiate between completing file:name and completing
file:name?
Andreas.
--
Andreas
"Clark J. Wang" writes:
> On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab wrote:
>
>> Maarten Billemont writes:
>>
>> > Why are we escaping all word break characters? rm file:name and rm
>> file\:name are effectively identical, I'm not sure I s
"Clark J. Wang" writes:
> On Fri, Feb 18, 2011 at 6:36 PM, Andreas Schwab wrote:
>
>> "Clark J. Wang" writes:
>>
>> > On Fri, Feb 18, 2011 at 5:38 PM, Andreas Schwab > >wrote:
>> >
>> >> Maarten Billemont writes:
>&g
echo "$(echo "1")" "$(echo "2")" "$(echo "3")"
>
> Counting PIDs on my sequentially-generating-PIDs OS seems to confirm that
> it's running three child processes, so that lends a tiny bit of evidence
> to my theory.
$ set
"Steven W. Orr" writes:
> 517 > r=($(eval echo "\${${a_all[1]}[@]}"))
If you use $(eval echo ...) you are almost always doing it wrong.
eval "r=(\"\${${a_all[1]}[@]}\")"
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint =
the developer, but in my mind, this is a welcome feature.
Looks like you didn't read what Michael wrote.
> TAB-completion should NOT modify what I typed,
Except that it does. $PWD/ and \$PWD/ are quite different things.
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:
> Fortunately the workaround was simple enough -- once the filename had
> been completed I went back and x'ed out the \.
Or use ~-/.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
&
"gnu.bash.bug" writes:
> What do you mean?
>
> ~-/. is no equal to $PWD
If you want $PWD, you can use ~+/.
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."
oted=$@
>>echo "$quoted"
>>echo "$unquoted"
>>!
>> done
>>
>> here bash treats unquoted $@ on rhs differently, expanding it like $*:
>
>Unquoted $@ *is* the same as $*.
But bash treats them differently.
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."
= 0
> close(7)= 0
> close(9)= 0
> close(10) = 0
> read(8,
That says nothing about what the child process does.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B
a (local) solution here
sigsetjmp is the same as setjmp. Both will lead to deadlocks.
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:
> In a NON-utf8 locale
Try using a utf8 locale.
The problem is that xdupmbstowcs2 fails to handle partial multibyte
sequences, where mbsnrtowcs may return zero.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 4
Henning Bekel writes:
> I've noticed that this problem does no longer occur if bash 4.2.8 is
> configured --with-bash-malloc. On my distribution (arch) bash is
> configured --without-bash-malloc by default.
This may indicate that bash is calling malloc in a signal han
^ unexpected newline or end of string
++ echo '"'
++ awk '$0)'
awk: $0)
awk: ^ syntax error
+ echo '' ''
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:
> 1) If Name isn't supplied, where does it put the handles & Pid?
"If NAME is not supplied, the default name is COPROC."
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
he Essential Etta
> James (Disc 2)"'
>
> I'm trying to understand why command substitution is happening at all,
> since the opening paren isn't preceded by a dollar sign.
The paren is a red herring, you need to get rid of the backquote.
(Use find instead of tree.)
An
Jonathan Nieder writes:
> For the future, the sh specification at
> http://www.unix.org/2008edition/ (free registration required)
http://pubs.opengroup.org/onlinepubs/9699919799/
(no registration required)
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C
Perhaps the wcwidth function is broken on MacOS.
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."
Petteri RXXty writes:
> betelgeuse@pena ~/test $ echo foo > a b
This is the same as: echo foo b > 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."
Eric Blake writes:
> Along with an accidental announcement for a missing patch 11:
>
> http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00028.html
It's not missing, that's a 4.1 patch.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6
"Joachim Schmitz" writes:
> Or did something break in forwarding mails to bug-bash to the news group?
Probably during the mail server move, gnu.emacs.help broke as well.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 2
S X and its use
> of both precomposed and decomposed UTF-8 than anything.
There is no such thing as "precomposed UTF-8" and "decomposed UTF-8".
UTF-8 is an encoding of Unicode, and both NFD and NFC are valid forms of
Unicode.
Andreas.
--
Andreas Schwab, sch...@linux-m6
nt concepts, the former is about physical representation of
Unicode, the latter is about conversion between abstract Unicode values.
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."
character string. Since
there is no way to produce a word containing a NUL character it is
impossible to support %lc in any useful way.
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 - besides declaring a variable local -
> protects upvars from malicious variable names:
>
> $ typeset 'ls -l'
> bash: typeset: `ls -l': not a valid identifier
> $ echo $?
> 1
Unfortunately, that is subverted by the unquoted use of $1 above.
Andr
DJ Mills writes:
> The only way I can think of to get the last argument in sh is to loop
> through them,
> something like:
> for arg; do last="$arg"; done; echo "$last"
$ eval echo \"\${$#}\"
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG
ules, so
you cannot use it like this.
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."
thing. BUT! if you
> run it remotely, the two channels all block up till program exit and
> it all comes out in one squirt.
There is nothing that flushes the output before the process exits.
(Nothing of this has anything to do with the shell.)
Andreas.
--
Andreas Schwab, sch...@linux-m6
Linda Walsh writes:
> if [[ -z "" && ((LINES < 80 )) ]]; then echo foo; fi
> (prints nothing)
>
> What am I missing?
"LINES" does not sort before "80".
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7
tml#trap
"Signals that were ignored on entry to a non-interactive shell cannot be
trapped or reset, although no error need be reported when attempting to
do so. An interactive shell may reset or catch signals ignored on entry."
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key finge
"Clark J. Wang" writes:
> Here the cannot expand ``*.d'' to ``long-dir-name.d''. Bug?
You need to add -o bashdefault for that.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"Clark J. Wang" writes:
> ``-o bashdefault'' works fine for me, thanks. But from the Bash manual I
> think ``-o default'' should also work:
>
> -o defaultUse readline's default filename completion if the compspec
> generates no matches.
G
Anders Sundman writes:
> Is it possible to get bash to use a fallback language for showing
> localized strings if no translation exists for the current language?
> Instead of using the 'raw' msgid that is.
The msgid is supossed to be the fallback. That's how
Eric Blake writes:
> On 07/27/2011 09:05 AM, Andreas Schwab wrote:
>> Anders Sundman writes:
>>
>>> Is it possible to get bash to use a fallback language for showing
>>> localized strings if no translation exists for the current language?
>>> Instead o
awk would be much better suited for this task.
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."
Roger writes:
> [ "${DEBUG}" -ne "0" ] && $@
Missing quotes.
[ "${DEBUG}" -ne 0 ] && "$@"
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."
Bob Proulx writes:
> Same comment here about over-quoting. If nothing else it means that
> syntax highlighting is different.
>
> dir=$(cd $(dirname "$path"); pwd -P)
You are missing a pair of quotes here. :-)
Andreas.
--
Andreas Schwab, sch...@
command isn't
executed until after the complete compound command was read.
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."
Sam Steingold writes:
> Cool. Now, what does this imply?
"For almost every purpose, shell functions are preferred over aliases."
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for so
cond piped process the ability to send signals
> to the first using its $PPID variable.
The parent of a pipeline process is always the calling shell.
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."
ages, which requires two levels of quoting if one of
these languages is embedded in another one.
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."
rtain words, even with a space.
Note that >&word (with word not a number or -) is a proper POSIX
extension, since POSIX explicitly leaves it unspecified.
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."
Peng Yu writes:
> It is strange to me why complete doesn't print anything when it is
> called in a bash script. I must have misunderstood some fundamentals.
> Does anybody know why? Thanks!
If complete does not print anything then there are no completions
defined.
Andreas.
--
Dallas Clement writes:
> [pid 6747] execve("/bin/touch", ["touch", "/mnt/array1/.accesstest"],
> [/* 14 vars */]) = 0
>
> The = 0 at the end is the exit status.
No, it isn't. It only says that execve was successful. The exit status
is set by
egral operation of the same interpreter.
They are really the same, but even if you change it bash still wins:
$ bash -c 'echo "hello"' >/dev/full
bash: line 0: echo: write error: No space left on device
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA
--- parse.y
+++ parse.y
@@ -5983,6 +5983,8 @@ save_input_line_state (ls)
/* force reallocation */
shell_input_line = 0;
shell_input_line_size = shell_input_line_len = shell_input_line_index = 0;
+
+ return ls;
}
void
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key
Peng Yu writes:
> This capability will be useful for debugging bash script.
See trap DEBUG and shopt extdebug.
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."
s no '!' operator. The 'until'
> was a way to negate the expression without using a '!' which didn't
> exist in that shell. An 'if' could operate using the 'else' clause.
> But there wasn't any other way to do it in a while l
d as first word in a line (where it
> likely introduces the paragraph describing it).
>
> In this case it works as well:
> /@
There is an index entry for @, so i @ RET brings you directly to the
description of the @ special parameter.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
e i get:
It's a bug in --enable-separate-helpfiles: the generated file contains
only one help string for echo, which happens to be the one for !V9_ECHO.
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."
valid arithmetic operator (error token is
> "#32")
Which part of "base is a decimal number between 2 and 64" did you not
understand?
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."
quot; did you not understand?
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."
return 0;
>}
> -if (uvalue <= UCHAR_MAX)
> +if (uvalue <= CHAR_MAX)
CHAR_MAX has nothing at all to do with UTF-8.
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."
John Kearney writes:
> what I suggest will fix the UTF-8 case
No, it won't.
> and not affect the UTF-2 case.
That is impossible.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for some
John Kearney writes:
> How can doing a direct assignment, in less cases break anything,
Where did I say that?
> And it does work for me, so impossible seems to be overstating it.
How is it possible to affect UTF-8 while not affecting UTF-8?
Andreas.
--
Andreas Schwab, sch...@linux-m6
John Kearney writes:
> It isn't just the quote removal that is confusing.
>
> The escape character is also not removed and has its special meaning.
The esacape character is also a quote character, thus also subject to
quote removal.
Andreas.
--
Andreas Schwab, sch...@linux-m6
t; systems. On the reporter's 64-bit amd64 system it will print out 8.
But it won't help if you don't use it.
diff --git a/lib/sh/zread.c b/lib/sh/zread.c
index 0fd1199..3731a41 100644
--- a/lib/sh/zread.c
+++ b/lib/sh/zread.c
@@ -161,7 +161,7 @@ zsyncfd (fd)
int fd;
{
off
Chet Ramey writes:
> That's true, and I made this change some months ago. The question is
> whether or not it makes a real difference,
Of course it does, int != off_t.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214
dethrophes writes:
> the missing "" in the case isn't redundant.
> i.e. case "$HOME" in
The word is not subject to word splitting and filename expansion, so
there is no need to quote.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA
101 - 200 of 817 matches
Mail list logo