2015-10-07 11:32:17 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-04-05 17:58:19 +02:00
|
|
|
|
|
|
|
( \
|
|
|
|
for f in $* ; do \
|
|
|
|
if [[ "$f" =~ \.gz$ ]] ; then \
|
|
|
|
GREP=zgrep; \
|
|
|
|
else \
|
|
|
|
GREP=grep; \
|
|
|
|
fi; \
|
|
|
|
${GREP} -H -A 1 ' ORGANISM' $f; \
|
|
|
|
done \
|
|
|
|
) | \
|
2015-10-07 11:32:17 -03:00
|
|
|
grep -B 1 Viridiplantae | \
|
2015-11-08 19:33:00 +01:00
|
|
|
gawk '{print $1}' | \
|
2015-10-07 11:32:17 -03:00
|
|
|
grep '\.gbk' | \
|
2018-04-05 17:58:19 +02:00
|
|
|
sed -E 's/(^.*\.gbk(.gz)?).$/\1/' | \
|
2015-10-07 11:32:17 -03:00
|
|
|
uniq
|