Skip to content

Instantly share code, notes, and snippets.

@pgp
Created January 30, 2020 12:36
Show Gist options
  • Save pgp/b61e93590e2b6ab2f585f15bbfdbab04 to your computer and use it in GitHub Desktop.
Save pgp/b61e93590e2b6ab2f585f15bbfdbab04 to your computer and use it in GitHub Desktop.
Hybrid batch/bash script
:<<BATCH
@echo off
rem Web source: https://stackoverflow.com/questions/17510688/single-script-to-run-in-both-windows-batch-and-linux-bash
echo %PATH%
exit /b
BATCH
#!/bin/bash # CAUTION: SHEBANG WON'T WORK HERE (NOT FIRST LINE)
echo $PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment