commenting

This commit is contained in:
vv01f 2019-11-16 21:49:06 +01:00
parent 28ddec282d
commit aa4d0f6e74
Signed by untrusted user who does not match committer: vv01f
GPG Key ID: 02625A16AC1D1FF6
1 changed files with 14 additions and 1 deletions

15
dhl.sh
View File

@ -1,6 +1,19 @@
#!/usr/bin/env sh
fn="dhl-ds-versendung-3.csv"
# target filename
tn="dhl-ds-versendung.csv"
# todo: download file (its UTF-8 encoded)
fn="dhl-ds-versendung-3.csv"
# backup
cp -f "$fn" "dhl.csv"
# replace special spaces and hyphens
sed -i -e 's/[\u00A0\u202F[:space:]]+/ /g' -e 's/[\u2010\u2011\u2012\u2013\u002D]+/-/g' -e 's/[\u00AD\uFEFF]+//g' "$fn"
# todo: convert encoding from UTF-8 to CP1252 "Windows"
# a possibility for conversion? seems not to be reliant
iconv -o "$tn" -f UTF-8 -t CP1252 "$fn"