News for hackers. Stuff that matters.
Re:Why bother with argv[0]? by soneil on Tuesday September 03, 2024 @03:06PM (#41438054)
I was going to say it'd be easier to have a single script, eg

    #!/bin/sh
    busybox $0 $@
and then every command required could just be a hardlink to the same script, instead of replicating it over and over again for hardcoded command names.

Then I realised the whole point is to posit a world where $0 doesn't exist, and we're not allowed to be clever about it.

Re:Why bother with argv[0]? by jenscow on Tuesday September 03, 2024 @09:08PM (#41440895)
In such a world, shells would probably have something like a $SCRIPT_NAME to work around this.