daniel-sc / bash-shell-to-bat-converter

Converter for bash shell scripts to windows batch files.
https://daniel-sc.github.io/bash-shell-to-bat-converter
MIT License
229 stars 45 forks source link

Does this work well? #57

Closed MesterPerfect closed 1 year ago

MesterPerfect commented 2 years ago

good morning I tried this tool with simple code However, the results were completely incorrect

bash code

#!/bin/bash
for i in */; do 7z a "${i%/}.zip" "$i"; done

Output code

@echo off
REM UNKNOWN: {"type":"For","name":{"text":"i","type":"Name"},"wordlist":[{"text":"*/","type":"Word"}],"do":{"type":"CompoundList","commands":[{"type":"Command","name":{"text":"7z","type":"Word"},"suffix":[{"text":"a","type":"Word"},{"text":"\"${i%/}.zip\"","expansion":[{"loc":{"start":1,"end":6},"parameter":"i","type":"ParameterExpansion","op":"removeSmallestSuffixPattern","word":{"text":"/","type":"Word"}}],"type":"Word"},{"text":"\"$i\"","expansion":[{"loc":{"start":1,"end":2},"parameter":"i","type":"ParameterExpansion"}],"type":"Word"}]}]}}
daniel-sc commented 1 year ago

Hi @MesterPerfect no - of course this is not "complete" (as stated in the readme) :-) Loops are not yet implemented - I'll close this as a duplicat of #58 Btw: Contributions for covering more commands are very welcome ;-)