On Sun, Mar 17, 2024 at 09:25:10AM +0000, Tim Woodall wrote:
> Hi,

[...]

> Is there a one-liner way to make shellcheck happy on the count line
> below (other than # shellcheck disable=SC2046)?
> 
> args() { echo a b c d; }
> count() { echo $#; }
> count $(args)
> 
> Obviously, any correct solution should output 4

Hm. Another way of counting words? Would "wc" count as cheating?
If yes, in which way?

(I'm trying to get a grasp of your problem by throwing possibly
flawed solutions at it, so I won't be hurt if you say so :-)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to