2 Nov 2021

Get One Line or Count the Number of Lines, Words, Characters in PowerShell

收藏到CSDN网摘

PowerShell is replacing cmd.exe in the new Windows operating systems, it's more efficient and powerful than its predecessor. The only drawback might be that the commands are much longer than what we used to see in cmd.exe. Counting the lines, words, even the characters are very useful - well, sometimes at least. This task can be easily done using some GUI software such as MS Word, Notepad, or vim if you prefer. PowerShell is capable of doing these jobs as well. Here is how ~