In cmd, it is possible to use linux commands with the ubuntu or bash commands but they are very fickle. In batch, it is also possible to make a vbs-batch hybrid, which got me thinking, is it possible to make a bash-batch hybrid? Besides being a tongue-twister, I feel that bash-batch scripts may be really useful.
What I have tried so far
- So far I tried using the empty
bashandubuntucommands alone since they switch the normal command-prompt to ubuntu/bash shell, but even if you put commands after theubuntu/bashthey wouldn't show or do anyting. - After I tried that I tried using the
ubuntu -runcommand but like I said earlier, its really fickle and inconsistent on what things work and what things don't. It is less inconsistent when you pipe things into it, but still usually doesn't work. - I looked here since it seemed like it would answer my question and I tried it but it didn't work since it required another program (I think).
- Also looked to this and I guess it failled miserably, but interesting concept.
- What I've gotten from all of my research is that most people think when this is mentioned of a file that could be run either as a
.batfile or as.shshell file instead of my goal, to make a file that runs both batch and bash commands in the same instance.
What I want this for relates to my other question where I am trying to hash a string instead of a file in cmd and you could do it with a bash command but I would still like to keep the file as a batch file.