cat-users AT lists.geant.org
Subject: The mailing list for users of the eduroam Configuration Assistant Tool (CAT)
List archive
- From: Jørn Åne <jorn.dejong AT uninett.no>
- To: cat-users AT lists.geant.org
- Subject: Re: [[cat-users]] Error in eduroam-linux-UP1.sh
- Date: Wed, 20 Jan 2016 11:32:27 +0100
Den 20.01.2016 11.25, skrev Stefan Winter:
Hi,
#!/bin/bash
which is, as Wikipedia just told me, a "shebang":
https://en.wikipedia.org/wiki/Shebang_%28Unix%29
The article contains a portability section, and suggests to use:
#!/usr/bin/env bash
instead for higher chances of portability. Maybe this is worth a try? It
does work on my machine; but the raw /bin/bash also does here.
Hi Stefan
Management summary: This seems like a good idea, I support this.
For Linux operating systems, I think it doesn't really matter. Every Linux I know about supports both /bin/bash and /usr/bin/env bash.
It gets more interesting when the CAT installer must support other UNIXes as well, such as {Free,Net,Open}BSD. These operating systems come without bash built in, and if bash is installed using a package manager, it will generally not be located in /bin/bash, but rather somewhere like /usr/local/bin/bash or /usr/pkg/bin/bash.
This is the reason that using /usr/bin/env bash is more portable than /bin/bash. But keep in mind that even though using env is more portable,
the user still must have bash installed for the script to be able to run.
Example of a system without bash installed:
# /usr/bin/env bash
env: can't execute 'bash': No such file or directory
# /bin/bash
-sh: /bin/bash: not found
--
Jørn de Jong
Systemutvikler
UNINETT AS
- [[cat-users]] Error in eduroam-linux-UP1.sh, Quentin Le Calvez, 01/19/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Tomasz Wolniewicz, 01/19/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Stefan Winter, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Stefan Winter, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Jørn Åne, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, A . L . M . Buxey, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Tomasz Wolniewicz, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Stefan Winter, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Stefan Winter, 01/20/2016
- Re: [[cat-users]] Error in eduroam-linux-UP1.sh, Tomasz Wolniewicz, 01/19/2016
Archive powered by MHonArc 2.6.19.