This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gawk -f | |
# for @callmekohei | |
BEGIN{ | |
# コンマ以外の1文字以上の連続 | |
# ないし、"以外の1文字以上の連続が""で囲われている | |
FPAT = "([^,]+|\"[^\"]+\")" | |
} | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gawk -f | |
# for @callmekohei | |
BEGIN{ | |
# コンマ以外の1文字以上の連続 | |
# ないし、"以外の1文字以上の連続が""で囲われている | |
FPAT = "([^,]+|\"[^\"]+\")"; | |
} | |
{ | |
# 配列消去 (前の行の処理が残っているため) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gawk -f | |
BEGIN{ | |
RS="\r\n" | |
FPAT="[^,]+|\"[^\"]+\"" | |
OFS= " --> " | |
} | |
{ | |
gsub(/\n/, "<LF>", $0); | |
print $1, $2, $3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters