Skip to main content

Questions tagged [shebang]

Use the tag /shebang if your question is about `#!`-string at the beginning of a script

0 votes
0 answers
43 views

Context I have a system user caddy and a shell script placed under /run/caddy/caddy-cert-obtained-wrapper.sh. /run and /run/caddy are owned by root:root with permissions 0755. caddy-cert-obtained-...
Martin Tovmassian's user avatar
-3 votes
2 answers
260 views

I've recently been playing with the legacy Bourne Shell from the GitHub repo heirloom-sh. It's installed at /usr/local/bin/sh with no symlinks. One script is invoking it via #!/bin/env sh. I'm running ...
Jesse's user avatar
  • 355
3 votes
2 answers
2k views

On macOS, #!/bin/bash means a script will use the system bash, which is very dated (3.2, 2006 year) and (for myself, at least) mostly useless. Then you can install modern bash using Homebrew or ...
jsx97's user avatar
  • 1,377
14 votes
1 answer
2k views

I've always heard that the target of a shebang line (e.g. #!/bin/bash) must be a binary executable, not a script. And this is still true for many OSes (e.g. MacOS). But I was surprised to see that ...
jrw32982's user avatar
  • 1,099
0 votes
0 answers
84 views

I stumbled across a really weird issue with mount. I'm unable to make sense out of it. For some context, I wrote a Python script that aims to automount hot-pluggable USB devices, but this is not ...
ShellCode's user avatar
  • 235
1 vote
0 answers
159 views

I have this "script" on my Arch Linux system: $ cat ~/scripts/foo.sh ps -hp $$ It will simply run ps on its own PID. But the script has no shebang line. I was expecting that in the absence ...
terdon's user avatar
  • 253k
4 votes
1 answer
1k views

#!python3 print("Hello") I find that this code works fine in my terminal. But everyone does #!/path/to/file or #!/usr/bin/env command. Is there any reason to avoid using #!command in ...
egrr's user avatar
  • 43
2 votes
2 answers
440 views

On Stack Overflow a comment to Can PowerShell Core handle ps1 files with CRLF line endings in Linux environments? asserted that executable files that use a shebang must use only the LF line ending, ...
Garret Wilson's user avatar

15 30 50 per page
1
2 3 4 5
10