1 alieblice@de-10:~$ grep "this" demo this line is the 1st lower case line in this file. Two lines above this line is empty. And this is the last line. alieblice@de-10:~$ 2 alieblice@de-10:~$ grep "this" demo demo2 demo:this line is the 1st lower case line in this file. demo:Two lines above this line is empty. demo:And this is the last line. demo2:this line is the 1st lower case line in this file. demo2:Two lines above this line is empty. demo2:And this is the last line. alieblice@de-10:~$ 3 alieblice@de-10:~$ grep "this" demo* demo:this line is the 1st lower case line in this file. demo:Two lines above this line is empty. demo:And this is the last line. demo2:this line is the 1st lower case line in this file. demo2:Two lines above this line is empty. demo2:And this is the last line. alieblice@de-10:~$ 4 alieblice@de-10:~$ grep -i "the" demo THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. this line is the 1st lower case line in this file. This Line Has All Its First Character Of The Word With Upper Case. And this is the last line. alieblice@de-10:~$ 5 alieblice@de-10:~$ grep "lines.*empty" demo Two lines above this line is empty. alieblice@de-10:~$ 6 alieblice@de-10:~$ grep -i "is" demo THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. this line is the 1st lower case line in this file. This Line Has All Its First Character Of The Word With Upper Case. Two lines above this line is empty. And this is the last line. alieblice@de-10:~$ 7 alieblice@de-10:~$ grep -iw "is" demo THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. this line is the 1st lower case line in this file. Two lines above this line is empty. And this is the last line. alieblice@de-10:~$ 8 alieblice@de-10:~$ grep -A 3 -i "example" demo3 Example to show the difference between WORD and word * 192.168.1.1 - single WORD * 192.168.1.1 - seven words. alieblice@de-10:~$ 9 alieblice@de-10:~$ grep -B 2 "single WORD" demo3 Example to show the difference between WORD and word * 192.168.1.1 - single WORD alieblice@de-10:~$ 10 alieblice@de-10:~$ grep -C 2 "Example" demo3 word - word consists of a sequence of letters, digits and underscores. Example to show the difference between WORD and word * 192.168.1.1 - single WORD alieblice@de-10:~$ 11 alieblice@de-10:~$ grep -v "go" demo3 4. Vim Word Navigation You may want to do several navigation in relation to the words, such as: WORD - WORD consists of a sequence of non-blank characters, separated with white space. word - word consists of a sequence of letters, digits and underscores. Example to show the difference between WORD and word * 192.168.1.1 - single WORD * 192.168.1.1 - seven words. alieblice@de-10:~$ 12 alieblice@de-10:~$ grep -e "is" -e "line" demo this line is the 1st lower case line in this file. This Line Has All Its First Character Of The Word With Upper Case. Two lines above this line is empty. And this is the last line. alieblice@de-10:~$ 13 alieblice@de-10:~$ grep -ve "is" -e "line" demo THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. 14 alieblice@de-10:~$ grep -c "go" demo3 6 alieblice@de-10:~$ 14-1 alieblice@de-10:~$ grep -c this demo 3 alieblice@de-10:~$ 15 alieblice@de-10:~$ grep -l this * demo demo2 16 alieblice@de-10:~$ grep -n "go" demo3 5: * e - go to the end of the current word. 6: * E - go to the end of the current WORD. 7: * b - go to the previous (before) word. 8: * B - go to the previous (before) WORD. 9: * w - go to the next word. 10: * W - go to the next WORD. alieblice@de-10:~$ ****************************************************************** http://www.debian-administration.org/articles/460 17 خاکستری export GREP_OPTIONS='--color=auto' GREP_COLOR='100;8' 18 قرمز export GREP_OPTIONS='--color=auto' GREP_COLOR='1;37;41' 19 سبز کمرنگ export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' 20 سفید export GREP_OPTIONS='--color=auto' GREP_COLOR='7'