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