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>
next in thread | raw e-mail | index | archive | help
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> ----------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.91.951201154747.3394A-100000>