LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   regular expression question (http://www.linuxquestions.org/questions/linux-software-2/regular-expression-question-55899/)

Gantrep 04-19-2003 11:24 PM

regular expression question
 
how would I grep (or perhaps sed?) a file for every line not starting with a certain phrase?

Gantrep 04-20-2003 12:01 AM

nevermind. I used awk.


awk '$1 !~ /192.168.|127.0.0.1/ {print $1}' access_log | more

azornoz 04-20-2003 04:24 PM

egrep -v "^192.168.|127.0.0.1" access_log|more


All times are GMT -5. The time now is 09:12 AM.