annotate bin/unfold.sh @ 44:abc1b05996c9
complete change of array var construction, used it for log file names too, tar update enabled, so maybe complete but w/o any parallel
| author |
Henry S. Thompson <ht@inf.ed.ac.uk> |
| date |
Tue, 07 Apr 2020 18:00:29 +0100 |
| parents |
a82c325e8b32 |
| children |
|
| rev |
line source |
|
18
|
1 #!/bin/bash
|
|
|
2 # Usage: unfold.sh links_...
|
|
|
3 pdfs=/beegfs/common_crawl/CC-MAIN-2019-35/pdfs
|
|
|
4 links=$pdfs/links
|
|
|
5 f=$1
|
|
25
|
6 IFS=' '
|
|
18
|
7 awk '{if (NR==1) { o=$1 ; u=$2 }
|
|
|
8 else
|
|
|
9 { if ($1=="annot" || $1=="scrape") {
|
|
|
10 print o,"\t",u
|
|
|
11 o=$1
|
|
|
12 u=$2
|
|
|
13 }
|
|
|
14 else {
|
|
|
15 u=u $1
|
|
|
16 }
|
|
|
17 }
|
|
|
18 }
|
|
|
19 END { print o,"\t",u }' $f
|