Skip to content

Glossary: Command Line for IT: Bash and PowerShell

-split

A PowerShell operator that cuts a string into an array of pieces at a regex pattern, such as a space. For example, `($_.Line -split ' ')[-4]` picks the fourth word from the end of a log line, which is the address in a "Failed password" line.

Where the book teaches it

Related terms

arrayawk