Windows 11のPowerShellを使って Linuxコマンドのgrepのようなコマンドを実行する方法です。
PowerShellコマンド Select-String
Select-String "検索したい文字" .\Documents\*
macOSの場合
macは grepがあるのですが、macOS版の PowerShellでも使えます
pwsh -Command Select-String "str" "./*"
UTF-8・Shift-JIS・サブフォルダ対応する場合
下記URLに記載しています


