This guide aims to document useful commands that I commonly see used in Linux and Unix environments to their closest equivalent in Powershell.
Command: wc
Linux:
~# echo -n internationalization | wc -c
20
Powershell:
> echo internationalization | Measure-Object -Character
Lines Words Characters Property
----- ----- ---------- --------
20
*nix | Powershell | What it does |
---|---|---|
wc -l | Measure-Object -Line | Returns the line count |
wc -c | Measure-Object -Character | Returns the character count |
wc -w | Measure-Object -Word | Returns the word count |
Resources: