blob: 5bc685720f042ae5029017ccf812280b833adfa9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
# Public domain notice for all NCBI EDirect scripts is located at:
# https://www.ncbi.nlm.nih.gov/books/NBK179288/#chapter6.Public_Domain_Notice
if [ "$#" -eq 0 ]
then
echo "Must supply path for inverted files"
exit 1
fi
target="$1"
target=${target%/}
find "$target" -name "*.inv" -delete
find "$target" -name "*.inv.gz" -delete
for fl in *.e2x.gz
do
base=${fl%.e2x.gz}
echo "$base.inv"
gunzip -c "$fl" |
rchive -invert |
gzip -1 > "$target/$base.inv.gz"
sleep 1
done
|