使用power shell搜索文件内容
$path = 'G:\Dev_Temp\FPGA\AC590\AC590_SoC_GHRD\software\spl_bsp'
$searchword = 'CONFIG_EMAC0_BASE'
$Filename = '*.h'
$filesWithKeyword = Get-ChildItem $path -Include "$Filename" -Recurse |Where-Object { $_ |Select-String -Pattern $searchword -SimpleMatch |Select-Object -First 1 }
Write-Host "Contents of ArrayPath:"
$filesWithKeyword.FullName
页:
[1]