From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Thu, 10 May 2007 09:18:23 +0100 To: 9fans@cse.psu.edu Subject: Re: [9fans] strange behavior? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 623c5d9c-ead2-11e9-9d60-3106f5b1d025 > ##script: > T = 'Eptatretus burgeri' > echo $T > awk '/'^$T^'/' all.uniq > echo '++++++++++++++++' > T=`{awk 'NR== '23' ' SpeciesList} > echo $T > awk '/'^$T^'/' all.uniq > ## result: > Eptatretus burgeri > Eptatretus burgeri (complete) Metazoa; Chordata; Craniata; Hyperotreti; Myxiniformes; Myxinidae; Eptatretinae; Eptatretus. NC_002807 cox1, -S(nga), D, cox2, K, atp8, atp6, cox3, G, nad3, R, nad4L, nad4, H, S(nct), L(nag), nad5, -nad6, -E, cob, T, -P, F, rrnS, V, rrnL, L(yaa), nad1, I, -Q, M, nad2, W, -A, -N, -C, -Y > ++++++++++++++++ > Eptatretus burgeri > awk: can't open file /burgeri/ > source line 1 > rc 117587: awk 117593: 2 I think this is a problem with rc treating $T as a list, and you need a list flattening operator (double quote). Perhaps what you need is awk '/'^$"T^'/' all.uniq [unsure as hasn't had any coffee yet] -Steve