Earlier quoted context omitted.
It's significantly better than batch
Well sure, but these days PowerShell is what Windows people use for anything non-trivial.
A language that compiles to Bash and Windows Batch
91–100 of 148 posts
Re: A language that compiles to Bash and Windows Batch
#92Isn't it ironic to write this tool in a language that is not available on Windows[1]? [1] "Windows support is comming soon. " https://ocaml.org/docs/install.html
Re: A language that compiles to Bash and Windows Batch
#93Earlier quoted context omitted.
> sometimes you still need to glue things together with CMD why? is there something cmd can do that python can't? one example is enough...
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
Re: A language that compiles to Bash and Windows Batch
#94I love the fact that someone, somewhere needed this, and then someone, somewhere created it.
Re: A language that compiles to Bash and Windows Batch
#95Earlier quoted context omitted.
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
How are you going to install batsh though?
Re: A language that compiles to Bash and Windows Batch
#96Earlier quoted context omitted.
> sometimes you still need to glue things together with CMD why? is there something cmd can do that python can't? one example is enough...
It's not about can or can't I think. Examples: Language runtime can't be installed, system locked down with deepfreeze, not enough permissions..
Re: A language that compiles to Bash and Windows Batch
#97Earlier quoted context omitted.
> sometimes you still need to glue things together with CMD why? is there something cmd can do that python can't? one example is enough...
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
Re: A language that compiles to Bash and Windows Batch
#98Re: A language that compiles to Bash and Windows Batch
#99I am the author of Batsh. Batsh is a toy language I developed 2.5 years ago in a hackathon. It was just for me to play with OCaml. Feel free to play with it at http://batsh.org/ .
Re: A language that compiles to Bash and Windows Batch
#100The idea is interesting, but ultimately the utility of this seems limited. The differences between windows and Unix are more than just the shell language involved; shell scripts are typically deeply intertwined with the system in question, to the point where it's often not the case that a bash script will even run reliably across different Unix systems, much less on windows. Also, you can already run bash on windows,…
I think it's a limitation more on the windows batch end. As mentioned, it's tricky for historical reasons. Powershell would be closer to Bash, functionally speaking. An adapter between the two would be more functional- however doesn't satisfy the point of batsh, which assumes cleanish-builds of the OS in question.
This should work in both bash and PS, with different results:
> curl HTTP://example.com > file.html