国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 平利县| 西丰县| 左云县| 江阴市| 田林县| 措美县| 普宁市| 清水河县| 定边县| 嘉峪关市| 睢宁县| 宝兴县| 宝清县| 磐安县| 陆丰市| 林甸县| 云阳县| 德保县| 普定县| 陆河县| 商洛市| 徐闻县| 偏关县| 五莲县| 泽普县| 大洼县| 灵武市| 左云县| 依兰县| 东港市| 海盐县| 桦甸市| 忻城县| 红河县| 永川市| 洞头县| 会宁县| 祁东县| 宁夏| 峨山| 阆中市|