tech-userlevel archive

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

Re: '/bin/sh -c' with multiple args



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


Home | Main Index | Thread Index | Old Index