Grep Commandgrep -ir word * Search all files for keyword "word" in current folder and sub-foldersgrep -ir -e word1 -e word2 * Search all files for keyword "word1" or "word2" in current folder and sub-foldersgrep -v word Search all files exclude keyword "word" in current folder and sub-folderscat file | grep -o '[^:]*$' cat the file and using grep to find the last field (cut ":" )grep -vFxf /tmp/exclude /tmp/all Compare two files the to show the context wihtout exclude list, such as:/tmp/exclude /tmp/allThe result only show : 444 555 grep -Fxf /tmp/exclude /tmp/all Compare two files the to show the match context, such as:/tmp/file1 /tmp/file2The result only show : 111 222 333 Server is hosted by Alanstudio Linux Operating System Recommend screen resolution 1024 x 768 / IE / FireFox Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved. |