server now exports profile only
This commit is contained in:
Submodule client-gui2 updated: 27d9d487fe...8238b873f4
42
prod_data_parse_scripts/parse_sklad_karta.sh
Executable file
42
prod_data_parse_scripts/parse_sklad_karta.sh
Executable 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
|
||||||
2
server
2
server
Submodule server updated: 9325e5b537...05833f55b3
Reference in New Issue
Block a user