2020-08-13 22:00:54 +02:00
|
|
|
#!/bin/zsh
|
|
|
|
#Adds the footnotes in the right location in the larger tsv file
|
|
|
|
while read line; do
|
|
|
|
start_of_line="$(echo "$line" | awk 'BEGIN{FS="\t"}{printf("%s\t%s\t%d\t%d\t%d\t\n",$1,$2,$3,$4,$5)}')"
|
2020-08-14 00:49:50 +02:00
|
|
|
if grep -q "$start_of_line" formatted_all_footnotes; then
|
|
|
|
count=$( grep "$start_of_line" formatted_all_footnotes | wc -l )
|
2020-08-13 22:00:54 +02:00
|
|
|
printf '%s' "$line"
|
|
|
|
for i in {1..$count}; do
|
|
|
|
printf '*'
|
|
|
|
done
|
|
|
|
printf '\n'
|
2020-08-14 00:49:50 +02:00
|
|
|
grep "$start_of_line" formatted_all_footnotes
|
2020-08-13 22:00:54 +02:00
|
|
|
else
|
|
|
|
echo "$line"
|
|
|
|
fi
|
2020-08-14 00:49:50 +02:00
|
|
|
done<bibel.tsv
|