The following works as intended...
Code: Select all
C:\Users\Logan>echo hi logan^^ | findstr /v "^^^^$"
hi logan
Code: Select all
C:\Users\Logan>echo "hi logan^^" | findstr /v "^^^^""$"
"hi logan^^"
Code: Select all
"hi logan
THX
Moderator: DosItHelp
Code: Select all
C:\Users\Logan>echo hi logan^^ | findstr /v "^^^^$"
hi logan
Code: Select all
C:\Users\Logan>echo "hi logan^^" | findstr /v "^^^^""$"
"hi logan^^"
Code: Select all
"hi logan
Code: Select all
hi logan^
Code: Select all
type test.txt | findstr /v "^^^^$"
Code: Select all
person1^
person1
person2^
person2
Code: Select all
C:\Users\CMY\Desktop\test batch scripts\findstr\v switch>type persons.txt | findstr /v "^^$"
person1^
person1
person2^
person2
Code: Select all
person1
person2
Code: Select all
C:\Users\CMY\Desktop\test batch scripts\findstr\v switch>type persons.txt | findstr /r "[1-9]$"
person1
person2
C:\Users\CMY\Desktop\test batch scripts\findstr\v switch>type persons.txt | findstr /v "[1-9]$"
person1^
person2^
/V Print only lines that do NOT contain a match.Squashman wrote:Read the help file. It should be evident what the /V switch does
Code: Select all
C:\Users\CMY\Desktop\test batch scripts\findstr\v switch>type persons.txt | findstr /v "\^"
person1
person2
C:\Users\CMY\Desktop\test batch scripts\findstr\v switch>type persons.txt | findstr /r "\^"
person1^
person2^
Code: Select all
findstr /veLc:"^"