Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Re: Boolean Grep?


Article: 7789 of alt.hackers
From: dawagner@princeton.edu (David A. Wagner)
Newsgroups: alt.hackers
Subject: Re: Boolean Grep?
Date: 8 May 1995 06:52:44 GMT
Organization: Princeton University
Lines: 27
Approved: Bruce,Bruce,Bruce,New-Bruce
Message-ID: 3okf3s$nnc@cnn.Princeton.EDU
NNTP-Posting-Host: phoenix.princeton.edu
X-Python-1: Is your name not Bruce?  That's going to cause a little confusion.
X-Python-2: Mind if we call you `Bruce' to keep it clear?
Originator: dawagner@phoenix.princeton.edu
Status: RO

In article <3oisj9$vp1@hopi.gate.net>,
Thomas Davis <tdavis@news.gate.net> wrote:
>
> #!/bin/csh
> set value = `grep $argv[1] $argv[2]`;
> if( $#value > 0 ) then
>   echo "True"
> else
>   echo "False"
>

Ack!!  That's disgusting.  Didn't your parents teach you not to use
csh in public?  Try /bin/sh instead:

grep pattern file1 file2 file3 > /dev/null && echo true

Anyhow, you really should read csh.whynot someday, for kicks. :-)

ObHackInProgress:
	Hacking the TCP/IP code for some protection against Mitnick-like
	host spoofing attacks by randomizing the initial sequence numbers
	a bit...phew, TCP is just a gawdawful big ol' mess.
		      < said affectionately :-) >

-------------------------------------------------------------------------------
David Wagner						 dawagner@princeton.edu



Parent

Child Child Child

Back to index