Last active
July 3, 2022 11:51
-
-
Save mariotaku/261430351fae5bfa69b1697fc123fb0e to your computer and use it in GitHub Desktop.
WSL Tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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