Aten747
Aten747

Reputation: 1

How to use Command Prompt's Find function to find blank lines?

I am using find to filter through results of a NetSH WiFi scan. There are over 2000 entries and many of them are no SSID, so the line just looks like "SSID ##: ", where the number signs are a number 0-99. Also there are many lines that are just blank. My question is is there a way to make the find command not include those lines. I have tried find /V "" and many others (including -r-n, ^r^n, /r/n and other variations of newline characters)

Any help is appreciated!

Upvotes: 0

Views: 69

Answers (1)

MC ND
MC ND

Reputation: 70933

whatevercommand | findstr /v /r /c:"^$"

Use findstr to retrieve the lines that do not contain (/v) the regular expression /r : start of line (^) followed by end of line ($)

Upvotes: 1

Related Questions