On Monday, 1 February 2021 at 12:41:19 UTC, Paul Backus wrote:
On Monday, 1 February 2021 at 12:11:46 UTC, Petar Kirov
[ZombineDev] wrote:
On Monday, 1 February 2021 at 11:10:28 UTC, Paul Backus wrote:
Unfortunately, you can't pass more than one command-line
argument on a #! line.
It is possible, using `/usr/bin/env -S command arg1 arg2` , as
of coreutils 8.30. I have been using it at work and it's
working perfectly. This functionality was already supported by
FreeBSD [1] for ~15 years, but the coreutils developers
implemented it just ~3 years ago [2].
This is great, thanks!
I was missing this feature often, I'm glad I found it recently ;)
I just checked, and it's available in Debian stable, so most
distros should have it by now.
Yes, I think it's safe to use on Linux nowadays. In the worst
case a user may need to upgrade their coreutils. I just mention
this because a teammate was still on Ubuntu 16.04 or 18.04 so he
had to upgrade [1].
[1]:
https://packages.ubuntu.com/search?keywords=coreutils&searchon=names&suite=all§ion=all