[Nix-dev] shebang in "throwaway" scripts
Marc Weber
marco-oweber at gmx.de
Mon Sep 6 22:51:11 CEST 2010
Hi Karn
Excerpts from Karn Kallio's message of Mon Sep 06 22:28:33 +0200 2010:
> When writing "throwaway" scripts I have been using shebang lines referring to
> the current-system like this:
a) run them using sh/bash script.sh
b) symlink env to /usr/bin/env
Then you can run python, perl .. scripts the "usual" way.
This is what I found to be most portable - even though its less "pure".
If you know they use sh only: /bin/sh exists no any linux (even nixos)
because glibc requires it or such.
Because /bin/sh is symlinked to bash I use that for most throw away
scripts instead.
Marc Weber
More information about the nix-dev
mailing list