News for hackers. Stuff that matters.
Re:Use Long Options in Scripts by hoherd on Saturday March 22, 2025 @06:20AM (#43444735)
It terminates argument parsing, so anything following it that starts with a hyphen will not be treated as an argument.

    $ echo 'hack the planet' > --help
    $ cat --help
    cat: illegal option -- -
    usage: cat [-belnstuv] [file ...]
    $ cat -- --help
    hack the planet
    $ rm -vf --help
    rm: illegal option -- -
    usage: rm [-f | -i] [-dIPRrvWx] file ...
           unlink [--] file
    $ rm -vf -- --help
    --help
    $ cat -- --help
    cat: --help: No such file or directory
Re:Use Long Options in Scripts by hiAndrewQuinn on Saturday March 22, 2025 @01:37PM (#43447312)
My eyes have been opened. Thank you!