Powershell

Recursively search for a string in all TXT files:

gci . *.txt -Recurse | select-string -pattern "search-text"

Compute the filesize sum of all of the TXT and XML files in the current directory:

PS:>gci *.txt,*.xml | measure-object -property Length -sum

Look up Powershell Environment Variables:/h2>
PS:> ${env:Path}.IndexOf("DoesExist")
26
PS:> ${env:Path}.IndexOf("DoesNotExist")
-1