I know there are hundred of pages that show the common stuff needed to make the change yourself, but I'm wondering if there's a tool/program that makes it automagically for you.

I'm pretty sure that it will probably not work for complex scripts, but suggesting changes would be a great start, even if it's not even able to make the changes - I mean, if there's a tool that suggests changes, that's good too.

For example, if you have this in your Bash script:

cd MyDir
touch new_file

I would expect the tool to return this:

cd MyDir
ni new_file -type file

Some details on the requirement:

  • If it's a standalone program, then platform should be Linux, AIX or Windows.
  • If it's a script, hopefully the language is Bash/Ksh/PowerShell, or Perl.
  • If there's an on-line tool, then it should not store any of the data presented.
  • This is fundamentally a language-to-language translation (of Bash operations to PowerShell operations) with the additional translation of application calls to the Linux environment to equivalent application calls (or Powershell operations if they are adequate). Is there a reason to believe this is simple? See stackoverflow.com/questions/3455456/…
    – Ira Baxter
    May 1, 2016 at 6:52
  • 2
    Personally, I would love to have such a tool. I want a utility (could be just a powershell script) that I could use to convert my many BASH scripts into powershell. For example, replace "grep" with Select-String superuser.com/questions/267845/grep-in-powershell replace "wc -l" with "find /c /v "" superuser.com/questions/959036/… etc.... Of course there will always be some tweaking necessary. That is to be expected. but it would be great to get the majority of the obvious changes done for me. A way to automate this would be a big help.
    – user41320
    Nov 6, 2018 at 14:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.