Timeline for fish shell : exec format error
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 29, 2018 at 9:20 | comment | added | Peschke |
@MichaelHomer: POSIX scripts can have a shebang if you want them to. Since OP later asked for a ‘universal’ shebang, #!/bin/sh would be the way to go in my opinion.
|
|
| Dec 29, 2018 at 8:06 | comment | added | Michael Homer | POSIX scripts don't have the shebang, and since fish isn't POSIX-compatible it can't call them anyway (the premise of this question), so I'm not sure that helps | |
| Dec 29, 2018 at 7:31 | comment | added | Peschke |
@suizokukan: #!/usr/bin/env bash is only universal if every system you want to execute the script has bash installed. If you want portability, write your script to be compatible with POSIX standards. Then most shells will be able to execute it without issue (as most common shells are POSIX compliant).
|
|
| Dec 29, 2018 at 7:14 | comment | added | suizokukan |
Ok, so I'm looking for a 'universal' shebang. What about #!/usr/bin/env bash (see stackoverflow.com/questions/10376206/…) ? This line allows my script to be launched directly with fish.
|
|
| Dec 29, 2018 at 7:03 | history | answered | Peschke | CC BY-SA 4.0 |