This commit is contained in:
Priec
2026-09-17 01:15:44 +02:00
parent bbe9be3859
commit c4b7c080f9
6 changed files with 3518 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
#!/bin/sh
set -eu
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
printf 'Usage: %s INPUT.csv [OUTPUT.csv]\n' "$0" >&2
exit 2
fi
input=$1
output=${2:--}
process_csv() {
awk -F '\",\"' '
BEGIN {
OFS = FS
}
{
sub(/\r$/, "", $0)
}
NR == 1 {
print
next
}
{
if ($5 == "- -") {
$5 = ""
}
print
}
' "$input"
}
if [ "$output" = "-" ]; then
process_csv
else
process_csv > "$output"
fi