Skip to content

Instantly share code, notes, and snippets.

@prail
Created October 23, 2017 17:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prail/24acc95908e581722c0e9df5795180f6 to your computer and use it in GitHub Desktop.
Save prail/24acc95908e581722c0e9df5795180f6 to your computer and use it in GitHub Desktop.
Bash and Batch polyglot. (Really nice for build scripts that need to support multiple platforms.)
echo off
echo ; set +v # > NUL
echo ; function GOTO { true; } # > NUL
GOTO WIN
# bash part, replace it to suit your needs
exit 0
:WIN
REM win part, replace it to suit your needs
@qb20nh
Copy link

qb20nh commented Sep 19, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment