From owner-freebsd-questions Tue Sep 3 17:34:17 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA11009 for questions-outgoing; Tue, 3 Sep 1996 17:34:17 -0700 (PDT) Received: from m4.sprynet.com (m4.sprynet.com [165.121.1.96]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id RAA10961 for ; Tue, 3 Sep 1996 17:34:14 -0700 (PDT) Received: from local.com (hd73-044.compuserve.com [199.174.249.44]) by m4.sprynet.com (8.6.12/8.6.12) with SMTP id RAA08169 for ; Tue, 3 Sep 1996 17:32:30 -0700 Message-Id: <199609040032.RAA08169@m4.sprynet.com> Comments: Authenticated sender is From: "Jesse" To: questions@freebsd.org Date: Thu, 10 Jan 1980 18:46:06 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Help with Scripts X-Confirm-Reading-To: "Jesse" X-pmrqc: 1 Priority: urgent X-mailer: Pegasus Mail for Win32 (v2.42a) Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello! If anyone knows of any good places to look for information on sh or csh scripts in FreeBSD I would greatly appreciate it. What I am trying to do is make a small script that will scan all the mail files in /var/mail for the keywords listed in a file, then if it finds any of those keywords, to move the mail file that it was in to a seperate directory (like /tmp/review), and copy a stock letter in it's place. It would need to run indefinatly in a constant loop. So far I have gotten far enough to search the mail files for the keywords using grep, however I don't know how to use IF correctly to see if grep actually found anything. If have checked all the manpages for info on csh and sh, but they where uninformative to say the least. P.S. This is for my high school. Thank you, Jesse Brown (bextreme@sprynet.com)