MACSCRPT Archives

January 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Olof Svensson <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 1 Jan 2007 14:54:23 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
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.
>
>

ATOM RSS1 RSS2