consider awk '/'^(a b)^'/' /dev/null awk: can't open file /b/ source line 1 your case is similar: T=(a b) awk '/'^$T^'/' /dev/null awk: can't open file /b/ source line 1 and finally awk '/'^$"T^'/' /dev/null success? note the " before the T in the last one.