Is it possible to write Bash scripts not in the Linux console, but directly in any executable files, as is possible in Windows, in batch files?

    1 answer 1

    Yes there is:

    > echo '#!/bin/sh\n echo "Hello world!"' > > sh Hello world! > chmod +x > ./ Hello world! 

    Expansion is of course not important. The execution bit is also optional (for it, only shebang is written).