Dear maintainer,
I believe, that the current behaviour of GNU Bash:
$ command cat &
[1] 3831
$ ps --pid $! --ppid $!
PID TTY TIME CMD
3831 pts/300:00:00 bash
3832 pts/300:00:00 cat
is problematic. Namely it is:
1) unexpected,
Chet Ramey wrote:
> On 6/29/20 4:33 PM, Dmitry Alexandrov wrote:
>> 1) unexpected, as (a) it does not seem to be documented, (b) itʼs
>> counter-intuitive and (c) other bourne-like shells (busybox ash, dash,
>> ksh93, mksh, zsh) does not do that;
>
> It's an opp
Eli Schwartz wrote:
> Useful replacements:
Thank you. Yes, I have to pick up habit to post known user-level workarounds
along with bugreports.
> If you need to ensure a disk executable is used,
Of course. Why ‘command’ otherwise?
> $ "$(type -P cat)" &
> [1] 2092352
> $ ps --pid $! --ppid $
Robert Elz wrote:
> | > If you need to ensure a disk executable is used,
> | Of course. Why "command" otherwise?
>
> That doesn't actually work, "command" can run built-ins
Ah, yes, thanks for correction.
> there is actually no method ‹…› which guarantees execution of an executable
> from
Robert Elz wrote:
> The whole point of trying to find a technique like was hoped for using
> command, and others have used env for, and still others, (exec command) (none
> of which are guaranteed to work) is so that the script will work with
> different shells and in different environments.
O
Clark Wang wrote:
> # echo $'foo'# press ESC C-e
> # echo $foo
+ the same with $"foo".
signature.asc
Description: PGP signature