Xref: utzoo comp.unix.questions:27548 comp.unix.shell:1088 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!agate!ucbvax!ucdavis!caldwr!rfinch From: rfinch@caldwr.water.ca.gov (Ralph Finch) Newsgroups: comp.unix.questions,comp.unix.shell Subject: Shell/gawk interaction Keywords: Bourne shell, awk Message-ID: <247@locke.water.ca.gov> Date: 13 Dec 90 22:21:04 GMT Followup-To: comp.unix.questions Organization: Calif. Depart. of Water Resources, Sac. Lines: 33 I do not understand why the following bourne shell script generates an error in the awk program: (call the script file test1) #!/bin/sh filename=$1 ; shift nargs=$# args="$*" echo $args gawk ' BEGIN { args="'$args'" print args exit }' $filename (running the script file): test1 abc 1 2 3 1 2 3 gawk: syntax error near line 3: args="1 ^ unterminated string -- Ralph Finch 916-445-0088 rfinch@water.ca.gov ...ucbvax!ucdavis!caldwr!rfinch Any opinions expressed are my own; they do not represent the DWR