Stupid command-line trick: Counting the number of lines in stdin - The Old New Thing - Site Home - M

Stupid command-line trick: Counting the number of lines in stdin - The Old New Thing - Site Home - M

瀏覽:774
日期:2025-04-27
On unix, you can use wc -l to count the number of lines in stdin. Windows doesn't come with wc, but there's a sneaky way to count the number of lines anyway: some-command-that-generates-output | find /c /v "" It is a special quirk of the find command that...看更多