From owner-freebsd-questions Fri Dec 1 12:58:38 1995 Return-Path: owner-questions 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 ; 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 To: questions@freebsd.org Subject: Hopefully a simple question Message-ID: 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> ----------------------------------------------------------