parsing
This commit is contained in:
@@ -11,7 +11,7 @@ input=$1
|
||||
output=${2:--}
|
||||
|
||||
process_csv() {
|
||||
awk -F ',' '
|
||||
awk -F '\",\"' '
|
||||
function clean_account(value, quoted) {
|
||||
quoted = substr(value, 1, 1) == "\"" &&
|
||||
substr(value, length(value), 1) == "\""
|
||||
@@ -44,7 +44,7 @@ process_csv() {
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
OFS = ","
|
||||
OFS = FS
|
||||
}
|
||||
|
||||
{
|
||||
@@ -61,7 +61,7 @@ process_csv() {
|
||||
key = key_value(cleaned)
|
||||
|
||||
if (key == "") {
|
||||
cleaned = "\"000\""
|
||||
cleaned = "000"
|
||||
key = "000"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user