MACSCRPT Archives

December 2006

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:
Sun, 31 Dec 2006 10:45:56 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Hej Mark and a Happy New Year to you

English is not my first language. I try to keep it short but I dont 
whant to sound rude.

I have:
OS X 10.3.9 and Bash as shell.
a .bash_profile file with < PATH=$PATH":/Users/neko/bin" >
in my bin folder: a script:
	
	#!/bin/bash

	alog="/private/var/log/httpd/access_log"
	ip1="127.0.0.1"
	ip2="192.168.0.101"

	if grep -v $ip1 $alog || grep -v $ip2 $alog
	then
		...
	fi
___________ END of script ________________

I try to open my 'access_log' and filter away (!) two ip-numbers, and 
pipe the result to 'BBEdit'

Problem
	if grep -v $ip1 $alog || grep -v $ip2 $alog	 (dont work) but
		 if grep -v $ip1 $alog	(work)

and how do I the pipe the result to a new BBEdit-file

If you or sombody else have an answer PLEASE CC me at [log in to unmask]


--
Olof Svensson

ATOM RSS1 RSS2