funcas.blogg.se

Text compare online without spaces
Text compare online without spaces













text compare online without spaces

Grep -l will print only the file names that having any of the desired patterns. So, we can use it to match all the whitespace characters that can come in between the words. ] character class pattern indicates any whitespace characters including space, tab, CR, LF etc. The main trick here is -z, it will treat the each line of input stream ended in ASCII NUL instead of new line, as a result we can match newlines by using usual methods. So, simply: grep -rlz 'this]*is]*some]*text'. choose files of which directory to exclude. find can be used to be selective on the files to search e.g. If you just want to search all files recursively starting from current directory, you don't need find, you can just use grep -r (recursive).

text compare online without spaces

type f -exec grep -lz 'this]*is]*some]*text' +Ĭonsidering the whitespaces can come in between the words only. With the newer versions of GNU grep (that has the -z option) you can use this one liner: find.















Text compare online without spaces