Former-commit-id: f816e3ce8b10e2ca3f1aa9ae969c24e699368e25 Former-commit-id: 16fb412552debdfd2172926e8a8b63be05257bdf
18 lines
505 B
Bash
Executable File
18 lines
505 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
( \
|
|
for f in $* ; do \
|
|
if [[ "$f" =~ \.gz$ ]] ; then \
|
|
GREP=zgrep; \
|
|
else \
|
|
GREP=grep; \
|
|
fi; \
|
|
${GREP} -H -A 1 ' ORGANISM' $f; \
|
|
done \
|
|
) | \
|
|
grep -B 1 Viridiplantae | \
|
|
gawk '{print $1}' | \
|
|
grep '\.gbk' | \
|
|
sed -E 's/(^.*\.gbk(.gz)?).$/\1/' | \
|
|
uniq |