2021-01-27 22:24:33 +01:00
|
|
|
#!/bin/zsh
|
|
|
|
printf "start at reading no. L-"
|
|
|
|
read -r start_no
|
|
|
|
for ((n=$start_no;n<=4000;n++)); do
|
|
|
|
printf "index of reading no. L-%s:" "$n"
|
2021-01-27 19:51:07 +01:00
|
|
|
read -r index
|
2021-01-27 22:24:33 +01:00
|
|
|
if [ "$index" -gt 2200 ]; then
|
|
|
|
echo "Kanji from third book. Just adding index and reading index for now"
|
|
|
|
printf '%s\t\t%s\n' "$index" "$n" | tee -ai readings_index
|
|
|
|
else
|
|
|
|
line="$(grep -P "^$index\t" lesungen)"
|
|
|
|
printf '%s\t%s\n' "$line" "$n" | tee -ai readings_index
|
|
|
|
fi
|
2021-01-27 19:51:07 +01:00
|
|
|
done
|