Bash PowerShell grep等价
我正在尝试将此命令行从bash移植到PowerShell:Bash PowerShell grep等价,bash,powershell,grep,Bash,Powershell,Grep,我正在尝试将此命令行从bash移植到PowerShell: git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head 到目前为止,我有: git verify-pack -v (Get-ChildItem ".git/objects/pack/pack-*.idx") | select-string -pattern "chain" 但是如何在PowerShell中进行反向匹配(选项
git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head
到目前为止,我有:
git verify-pack -v (Get-ChildItem ".git/objects/pack/pack-*.idx") | select-string -pattern "chain"
但是如何在PowerShell中进行反向匹配(选项-vto)?您的意思是
-NotMatch
Select-String -NotMatch -Pattern "chain"