Skip to content

Instantly share code, notes, and snippets.

@AmaiSaeta
Created December 9, 2013 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmaiSaeta/7874062 to your computer and use it in GitHub Desktop.
Save AmaiSaeta/7874062 to your computer and use it in GitHub Desktop.
PATHから"HOGEHOGE"を含む物を取り除くPowerShellコマンド。 "HOGEHOGE"を適時変更すれば良し。
((Get-Content Env:Path) -Split ";" | Where-Object { $_ -notmatch "\b" + "HOGEHOGE" + "\b" }) -Join ";" | Set-Content Env:Path
@AmaiSaeta
Copy link
Author

()がうざったいので、もうちょっとどうにかならないかなとか考えてる。
ワンライナーじゃ無理かな……

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