PolyShell is a script that's simultaneously valid in Bash, Windows Batch, and PowerShell. This makes PolyShell a useful template for…