Batsh – A language that compiles to Bash and Windows Batch
11–20 of 130 posts
I have to ask, why?
Re: Batsh – A language that compiles to Bash and Windows Batch
#12I would have preferred a bash/powershell solution. Hoping no one is still writing batch files on windows... even if he is still using xp
Totally agree. Powershell is what you need to use on windows. It's been available on the default server install since 2008 R2. No need for batch scripts anymore.
Re: Batsh – A language that compiles to Bash and Windows Batch
#13I have to ask, why?
I posted it here to start a discussion not as an endorsement as we have all kinds of sugary compilers - for JavaScript and other languages, but none of Bash. Cross-platform support would be nice and as others have pointed out, PowerShell really took over Batch especially when Microsoft took care of the slow loading issue. I personally would rather have an extension of Bash rather than a brand new language, but that's me. In fact, I've been thinking of a simple preprocessor that even combines a bunch of scripts into a single one for easier distribution.
Re: Batsh – A language that compiles to Bash and Windows Batch
#14A language that compiles to bash from what?
Re: Batsh – A language that compiles to Bash and Windows Batch
#15This would be extremely handy for me in the past when I had to make both bash and bat scripts. I always hated with passion freaking Windows bat.
Re: Batsh – A language that compiles to Bash and Windows Batch
#16Love the idea of writing bash in a higher, easier to read format, similar to CoffeeScript. Unfortunately Batsh is written in OCaml (the author addresses why he uses it though).
How do you use pipes in batsh?
Re: Batsh – A language that compiles to Bash and Windows Batch
#17A language that compiles to bash from what?
From itself? Batsh is the language you would write the scripts in and then run them through the compiler, you can either target bash or batch.
Batsh -> Bash or Batch
Re: Batsh – A language that compiles to Bash and Windows Batch
#18This is great for me. As part of my day job I am often stuck writing batch scripts (yes, in 2014) for clients that refuse to run powershell. Writing a simple batch script is usually not a problem, but it can be very encumbering as the complexity increases.
Thank you for sharing.
Re: Batsh – A language that compiles to Bash and Windows Batch
#19Re: Batsh – A language that compiles to Bash and Windows Batch
#20Love the idea of writing bash in a higher, easier to read format, similar to CoffeeScript. Unfortunately Batsh is written in OCaml (the author addresses why he uses it though). How do you use pipes in batsh?
I reckon you don't, because it's not supported in windows batch.
Just googled it. Doesn't seem to be supported yet: https://github.com/BYVoid/Batsh/issues/17