Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!think!ames!ucbcad!ucbvax!hplabs!motsj1!mcdchg!usenet From: tigger@homxc.UUCP (K.VENNER) Newsgroups: comp.unix Subject: AWK and the system() command Message-ID: <776@mcdchg.UUCP> Date: Fri, 5-Jun-87 12:40:08 EDT Article-I.D.: mcdchg.776 Posted: Fri Jun 5 12:40:08 1987 Date-Received: Wed, 10-Jun-87 03:41:19 EDT Sender: usenet@mcdchg.UUCP Organization: AT&T Bell Laboratories, Holmdel Lines: 31 Approved: usenet@mcdchg.UUCP To all you netlanders: Here I sit, trying to write some utilities to handle distribution lists, labels and electronic mail. What I am really trying to do is replace a single line within a file with the output of either a shell script or the output of a whole different file. I am attempting to do something identical to the idea of the "#include (filename)" statement within a "C" program. The awk program would look like: awk ' $1 == "The proper line" {system("cat file1") }' Looking at the technical document on AWK (doc # 11272-850619-06TM) page 24 is an example of what I am trying to accomplish. Any suggestions, I am totally baffled, and right now the Unix counseling at my site is too busy to get too much headway on this problem. -- ------------------------------------------------------------------------------ ____ _______ _____ _______ ------- Ken Venner / __ \ |__ __| / _ \ |__ __| -====------ AT&T Bell Laboratories | (__) | | | \ \ \_\ | | -======------ HO 1D-425A x9080 | __ | | | / \ __ | | --====------- Holmdel, NJ | | | | | | | (\ / / | | ----------- ...!ihnp4!homxc!tigger |_| |_| |_| \_____/ |_| ------- Disclaimer: My opinions are soley my own!