国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > PowerShell > 正文

Powershell小技巧之復(fù)合篩選

2020-10-29 21:04:21
字體:
供稿:網(wǎng)友

當(dāng)你分析文本日志或篩選不通類型的信息時,你通常要使用 Where-Object。這里有一個通用腳本來說明復(fù)合篩選:

# logical AND filter for ALL keywords Get-Content -Path C:/windows/WindowsUpdate.log |  Where-Object { $_ -like '*successfully installed*' } |  Where-Object { $_ -like '*framework*' } |  Out-GridView # above example can also be written in one line # by using the -and operator # the resulting code is NOT faster, though, just harder to read Get-Content -Path C:/windows/WindowsUpdate.log |  Where-Object { ($_ -like '*successfully installed*') -and ($_ -like '*framework*') } |  Out-GridView # logical -or (either condition is met) can only be applied in one line Get-Content -Path C:/windows/WindowsUpdate.log |  Where-Object { ($_ -like '*successfully installed*') -or ($_ -like '*framework*') } |  Out-GridView
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 伊宁县| 顺平县| 桂东县| 贺州市| 荣成市| 韩城市| 富蕴县| 盐源县| 宣化县| 华蓥市| 宜丰县| 乐亭县| 涟水县| 清苑县| 苍梧县| 平南县| 临沭县| 新余市| 始兴县| 微山县| 通化县| 营山县| 临颍县| 廉江市| 杭州市| 黔江区| 苍南县| 奉贤区| 瑞金市| 宜兰市| 井研县| 新巴尔虎右旗| 博乐市| 项城市| 南汇区| 定兴县| 楚雄市| 景宁| 梨树县| 宜阳县| 双鸭山市|