November 2018
Intermediate to advanced
566 pages
17h 15m
English
The task here is primarily to look for text patterns. We use the following script to accomplish these tasks (it is recommended that you view this script in a code editor—the file is available as 04-Search-FileForPattern.ps1 within the ch10 directory):
$ReportPath = "$HOME/random/FileSearchReport.txt" $CheatsheetPath = "$HOME/Documents/code/github/powershell/cheatsheets" if (!(Test-Path $ReportPath)) { New-Item $ReportPath -ItemType File -Force } "Here are the PowerShell code blocks present within the cheatsheets." | Out-File $ReportPath Select-String '```powershell' $CheatsheetPath/*.md | ForEach-Object { $PSItem = $PSItem -split ':' ...Read now
Unlock full access