pjh@otter.hpl.hp.com (Patrick Hyland) (01/21/89)
> fdelim="c " > awk ' > BEGIN { > bd = "d " > fdelim = "'${fdelim}'" > } > ' hl_l1 When fdelim is "c ", after parameter substitution has been done on the awk command, awk has three arguments (the space in "c " acts as a field delimiter). The first of these arguments is: 'BEGIN { bd = "d " fdelim = "c' and awk correctly rejects this. The following does what you want: fdelim="c " awk ' BEGIN { bd = "d " fdelim = "'"${fdelim}"'" } ' hl_l1 Patrick Hyland. Hewlett-Packard Laboratories, Bristol, England.