Paweł Grzybek on Nostr: 🔥 Hot tip The shebang line defines which interpreter should be used to execute a ...
🔥 Hot tip
The shebang line defines which interpreter should be used to execute a script. For example:
```
#!/bin/fish
```
```
#! /opt/homebrew/bin/fish
```
This is great, but we cannot send a script defined like that to a friend because their fish executable (or whatever else) can be located under a different path. Use this instead 😉
```
#!/usr/bin/env fish
```
Learned from fish docs:
https://fishshell.com/docs/current/index.html#shebang-line
#programming
The shebang line defines which interpreter should be used to execute a script. For example:
```
#!/bin/fish
```
```
#! /opt/homebrew/bin/fish
```
This is great, but we cannot send a script defined like that to a friend because their fish executable (or whatever else) can be located under a different path. Use this instead 😉
```
#!/usr/bin/env fish
```
Learned from fish docs:
https://fishshell.com/docs/current/index.html#shebang-line
#programming