Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA01068; Sat, 2 Dec 95 15:25:18 EST
Received: from freefall.FreeBSD.ORG by MIT.EDU with SMTP
	id AA23687; Sat, 2 Dec 95 15:24:16 EST
Received: from localhost (daemon@localhost)
          by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id NAA24707
          ; Fri, 1 Dec 1995 13:01:10 -0800
Received: (from root@localhost)
          by freefall.freebsd.org (8.6.12/8.6.6) id MAA24439
          for questions-outgoing; Fri, 1 Dec 1995 12:58:38 -0800
Received: from mail.bw.lgca.ohio.gov (mail.bw.lgca.ohio.gov [156.63.242.129])
          by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA24434
          for <questions@freebsd.org>; Fri, 1 Dec 1995 12:58:31 -0800
Received: (from glitch@localhost) by mail.bw.lgca.ohio.gov (8.6.11/8.6.9) id PAA03403; Fri, 1 Dec 1995 15:52:15 GMT
Date: Fri, 1 Dec 1995 15:52:15 +0000 ()
From: Jeff Brand <glitch@mail.bw.lgca.ohio.gov>
To: questions@FreeBSD.ORG
Subject: Hopefully a simple question
Message-Id: <Pine.NEB.3.91.951201154747.3394A-100000@mail.bw.lgca.ohio.gov>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-questions@FreeBSD.ORG
Precedence: bulk

In an sh script that I'm trying to program, I would like to read a line 
from a text file, get the first 'phrase' in a line (via awk) into an if 
statment. If the if statement passes, I would like to redirect the 3rd 
word of that line to another command (either an echo, or to execute as 
its own command..)

Is there a way to do this? If this will help, the separator is ::
I have previously catted the file, and used head and tail to look through 
the file, but I was hoping I could find a more efficient method.

Another possibility: Could I just put the contents of the file (very 
small, about 5K, probably) into a variable (The file DOES contain 
newlines.)

Thanks for any help that you can give.

--
-And remember, you are unique... Just like everybody else.
-<"Jeff Brand" glitch@mail.bw.lgca.ohio.gov>
----------------------------------------------------------

