Give me a Select-String command equivalent to grep [pattern] [filepath] -A10
- User
Give me a
Select-Stringcommand equivalent togrep [pattern] [filepath] -A10 - Assistant
The
Select-Stringcommand in PowerShell can be used to search for a specified pattern in a file and display up to 10 lines of matching text. Here is an example command that does this:Select-String -Path "path\to\file.txt" -Pattern "pattern" -Count 10
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.