Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Command execution
- X-seq: zsh-workers 49587
- From: aismtnt@xxxxxxxxxxxx
- To: zsh-workers@xxxxxxx
- Subject: Command execution
- Date: Mon, 15 Nov 2021 12:40:47 +0100 (CET)
- Archived-at: <https://zsh.org/workers/49587>
- List-id: <zsh-workers.zsh.org>
There is a statement in docs:
'If execution fails because the file is not in executable format,
and the file is not a directory, it is assumed to be a shell
script. /bin/sh is spawned to execute it.'
I wonder if it's true or maybe I'm missing something.
My understanding is that if I create a file with shell commands but won't change its mode to executable, it will still be executed, because it is assumed to be a shell script.
But it does not.
```zsh
# Create file.
echo 'echo "Hello world"' > my_script
# Run file.
my_script
zsh: command not found: my_script
```
Messages sorted by:
Reverse Date,
Date,
Thread,
Author