I created basic script in Windows.
#!/bin/bash
echo Hello
I am using Cmder, ConEmu derivative. I tried to change the priviliges with chmod, but they are the same. I don't know how can I execute this script. Normal Linux way, which is: ./hello.sh does not work, and typing just hello.sh makes Windows try to open it, which is bad, since I want it in console. How to execute this script in ConEmu/Cmder?
Some features of Cmder: Run linux bash, batch and powershell commands. Smooth text wrapping when window resizing.
Cmder uses Cmd.exe by default, but heavily customizes it – the actual interactive prompt that you see isn't a normal Cmd.exe prompt; it is shown by ConEmu's clink which gets injected into the Cmd process.
BASH will be available in the Command Prompt and PowerShell. Open Command Prompt and navigate to the folder where the script file is available. Type Bash script-filename.sh and hit the enter key. It will execute the script, and depending on the file, you should see an output.
I've noticed you can run bash
from cmder. So I could do it like:
> bash
$ ./yourScript.sh
or simpler
> cat yourScript.sh | bash
Disclaimer: New to cmder (just downloaded it) and Linux myself.
On my own instance of Cmder, bash [filename]
works just fine, and I believe much simpler:
C:\Users\Conor O'Brien
λ type test.sh
echo Hello
C:\Users\Conor O'Brien
λ bash test.sh
Hello
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With