commenting
This commit is contained in:
parent
28ddec282d
commit
aa4d0f6e74
15
dhl.sh
15
dhl.sh
|
@ -1,6 +1,19 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
fn="dhl-ds-versendung-3.csv"
|
|
||||||
|
# target filename
|
||||||
tn="dhl-ds-versendung.csv"
|
tn="dhl-ds-versendung.csv"
|
||||||
|
|
||||||
|
# todo: download file (its UTF-8 encoded)
|
||||||
|
|
||||||
|
fn="dhl-ds-versendung-3.csv"
|
||||||
|
# backup
|
||||||
cp -f "$fn" "dhl.csv"
|
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"
|
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"
|
iconv -o "$tn" -f UTF-8 -t CP1252 "$fn"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user