What about in a here doc so some thing like
#!/bin/bash
TEST='here' cat << EOF awk '/$TEST/ {print}' /somefile EOF
do the ' still keep there meaning in a here doc ?
Wouldn't it be a lot easier to use awk's -v option (that's the reason it's there):
#!/bin/bash
TEST="Here" echo "is a test" | /usr/bin/awk -v i="$TEST" '{print ("\"" i, $0 ".\"")}'
Robert Thorsby -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html