Skip to content

Instantly share code, notes, and snippets.

@mariotaku
Last active July 3, 2022 11:51
Show Gist options
  • Save mariotaku/261430351fae5bfa69b1697fc123fb0e to your computer and use it in GitHub Desktop.
Save mariotaku/261430351fae5bfa69b1697fc123fb0e to your computer and use it in GitHub Desktop.
WSL Tools
#!/bin/sh
PS_ARGS=""
if [ -n "$1" ] && [ -e "$1" ]; then
PS_ARGS="-ExecutionPolicy bypass -File $1"
fi
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe $PS_ARGS
#!/bin/sh
skip_files=$(ps -Ao pid= | sed 's/.*/&_interop/')
find /run/WSL -name '*_interop' $(printf "! -name %s " $skip_files) | xargs rm -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment