'exclude'에 해당하는 글 1건

출처 : http://stackoverflow.com/questions/4538253/grep-how-could-i-exclude-one-word


Q.


I need something like grep ^"unwanted_word"XXXXXXXX



A.

You can also do it using -v option of grep as:

grep -v "unwanted_word" file | grep XXXXXXXX

grep -v "unwanted_word" file will filter the lines that have the unwanted_word and grep XXXXXXXX will list only lines with pattern XXXXXXXX.

EDIT:

From your comment it looks like you want to list all lines without the unwanted_word. In that case all you need is:

grep -v 'unwanted_word' file




WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,