Re: '/bin/sh -c' with multiple args
RVP <[email protected]> Thu, 4 Dec 2025 23:08:53 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.devel.userlevel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 4 Dec 2025, RVP wrote: > ``` > $ sh -c '/bin/echo $0: "$@"' whatever a b c > whatever: a b c > $ > ``` > To elaborate: `-c' parallels the standard usage: ``` $ sh foo.sh a b c ``` except, the script is right there; and since it (now) has no name, $0 also has to be supplied. -RVP