zsh-workers
 help / color / mirror / code / Atom feed
* Command execution
@ 2021-11-15 11:40 aismtnt
  2021-11-15 13:33 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: aismtnt @ 2021-11-15 11:40 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]


Documentation: https://zsh.sourceforge.io/Doc/Release/Command-Execution.html

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 shellscript. /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
```

[-- Attachment #2: Type: text/html, Size: 1481 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-15 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 11:40 Command execution aismtnt
2021-11-15 13:33 ` Mikael Magnusson
2021-11-15 13:39   ` Roman Perepelitsa

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).