bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ‘command … &’ creates subshell


From: Eli Schwartz
Subject: Re: ‘command … &’ creates subshell
Date: Wed, 1 Jul 2020 14:19:28 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 7/1/20 2:01 PM, Robert Elz wrote:
> The lack of an easy method to force execution of a command from the
> filesystem is very likely because there is generally no reason to do
> that.   That is, no-one ever really wanted it, so no method was invented.
> 
> However, for whatever reason, people keep asking how.  Either by directly
> asking the question, or by picking one of the popular (but incorrect)
> methods, and either claiming it works, or complaining when it doesn't.
> 
> As best I can tell, other than doing a search of PATH, and then using the
> full path name (which is what $(type -P cmd) does in bash, more succinctly
> than shells that don't have this -P option to type), [...]

One reason might be because the busybox applets for programs which are
*normally* external disk utilities, can be lacking in functionality,
often by a lot. In some cases, *hilariously* so (look at busybox ps,
it's basically a long list of FIXMEs for POSIX requirements).

I will confess however that I usually solve this by not considering
busybox to be a suitable /bin/sh.

The more general solution, possibly, would be e.g. invoking gawk, not
awk, if you know you need extended functionality. awk might be a builtin
(is, with busybox), but gawk probably isn't!

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]