On 07Oct2020 11:07, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote: >On Tue, 2020-10-06 at 15:45 -0700, ToddAndMargo via users wrote: >> I start all my Raku programs with >> 1: #!/usr/bin/env raku > >Why? If you aren't adding options to 'env', surely this is the same as >using '/usr/bin/bash'. No, this is a standard shebang (#!) hack to accomodate differering installation paths. The #! requires a fixed absolute path. So things which are often installed in different places (such as raku above) like /usr/local/bin or /opt/something and accessed via the user's $PATH setting, putting in this line makes the script more portable. It does rely on "env" itself being in /usr/bin, but that is very common. (Not universal, the a plenty of systems where I make a symlink from /bin/env to /usr/bin/env to enable _exactly_ ToddAndMargo's approach.) Anyway, since env uses $PATH to locate the following executable, this lets you write scripts for a typically-third-party interpreter portably. My own common use case is: #!/usr/bin/env python3 which runs my preferred python3 (usually the one in my personal ~/var/venv/3). Cheers, Cameron Simpson <cs@xxxxxxxxxx> _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx