batch file - As only show the words found in the findstr -


how display words found in search instead of displaying lines?

my code:

findstr /li /g:"list.txt" "file.txt">"result.txt" 

list:

disc music song album 

result:

disc1312we7das67da 13dsdsa67dsahdsa7amusic dsadsdfdsasong1223234235 

the desired result:

disc music song 

@echo off  (for /f %%a in (list.txt) (    findstr /li /c:"%%a" "file.txt" > nul    if not errorlevel 1 echo %%a )) > "result.txt" 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -