Skip to content

Instantly share code, notes, and snippets.

@kunst1080
Last active April 24, 2017 14:47
Show Gist options
  • Select an option

  • Save kunst1080/afc6130050f17cc22fa6478eb66d2cfe to your computer and use it in GitHub Desktop.

Select an option

Save kunst1080/afc6130050f17cc22fa6478eb66d2cfe to your computer and use it in GitHub Desktop.
ShellScript in Windows BAT
@rem '
@echo off
set P="/mnt/%~f0"
set P=%P:\=/%
set P=%P::=%
set P=%P:/mnt/C/=/mnt/c/%
set P=%P:/mnt/D/=/mnt/d/%
bash.exe %P% %*
goto :eof
' 2>/dev/null
# ---------- SHELL ---------- #
echo \$1 = $1
yes This is ShellScript | head -3
@kunst1080
Copy link
Copy Markdown
Author

Change the line feed code to LF.

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