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
Published at
2024-05-18 07:30:05Event JSON
{
"id": "fa29f9c2b421d3def03abfab569007bd153d3db36dd14e8a58ebfdb19055f167",
"pubkey": "84e83ac96b0bafa3015a20c7a54881305b3fa708aa57c3ae78d730724d61b11a",
"created_at": 1716017405,
"kind": 1,
"tags": [
[
"t",
"programming"
],
[
"proxy",
"https://mastodon.social/users/pawelgrzybek/statuses/112460916718018726",
"activitypub"
]
],
"content": "🔥 Hot tip\n\nThe shebang line defines which interpreter should be used to execute a script. For example:\n\n```\n#!/bin/fish\n```\n\n```\n#! /opt/homebrew/bin/fish\n```\n\nThis 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 😉\n\n```\n#!/usr/bin/env fish\n```\n\nLearned from fish docs:\nhttps://fishshell.com/docs/current/index.html#shebang-line\n\n#programming",
"sig": "5a026ff87658214360ba6afceaa0f1e0d06caa86b46e9432d54bf709108f08e83c67710d14956bc6c2b800961238c4b06e1ab320c84f9c972a26eca6d26e1dc5"
}