Hallo and thanks. I can se now I was trying to write an if-else and mistakingly using a doubble pipe for 'OR' Now I have skiped the if-else an the filtering works good. I even understand why I dont need file in the second grep now. THANKS Now the problen to pip it to BBEdit or another file fom the script remains. this works from appl "Terminal" $ grep -v '127.0.0' $filname | grep -v '192.168.0.' | bbedit but not from the script. If You have some more time to spend on me. -- Olof Svensson 2007-01-01 kl. 04.00 skrev MACSCRPT automatic digest system: > What I think you want is > > if grep -v $ip1 $alog | grep -v $ip2 > > What you have searches the file and if there is a line that is > missing the first ip address it returns true and since || returns > true before evaluating all of the parameters you merely get a list > from the first. > > | is called the pipe operator and it takes the output of one command > and feeds it into the next as an input. Notice that I didn't have a > file in the second grep. > >