* [9fans] strange behavior?
@ 2007-05-10 6:45 cej
2007-05-10 8:16 ` Charles Forsyth
2007-05-10 8:18 ` Steve Simon
0 siblings, 2 replies; 3+ messages in thread
From: cej @ 2007-05-10 6:45 UTC (permalink / raw)
To: 9fans
##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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] strange behavior?
2007-05-10 6:45 [9fans] strange behavior? cej
@ 2007-05-10 8:16 ` Charles Forsyth
2007-05-10 8:18 ` Steve Simon
1 sibling, 0 replies; 3+ messages in thread
From: Charles Forsyth @ 2007-05-10 8:16 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
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.
[-- Attachment #2: Type: message/rfc822, Size: 2915 bytes --]
From: <cej@gli.cas.cz>
To: <9fans@cse.psu.edu>
Subject: [9fans] strange behavior?
Date: Thu, 10 May 2007 08:45:24 +0200
Message-ID: <ACCF003CBA3D09458207DB0CB86AD17D481B45@XMAIL.asuch.cas.cz>
##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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] strange behavior?
2007-05-10 6:45 [9fans] strange behavior? cej
2007-05-10 8:16 ` Charles Forsyth
@ 2007-05-10 8:18 ` Steve Simon
1 sibling, 0 replies; 3+ messages in thread
From: Steve Simon @ 2007-05-10 8:18 UTC (permalink / raw)
To: 9fans
> ##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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-10 8:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-10 6:45 [9fans] strange behavior? cej
2007-05-10 8:16 ` Charles Forsyth
2007-05-10 8:18 ` Steve Simon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).