Skip to content

Instantly share code, notes, and snippets.

@10nin
Created January 18, 2013 09:47
Show Gist options
  • Save 10nin/4563492 to your computer and use it in GitHub Desktop.
Save 10nin/4563492 to your computer and use it in GitHub Desktop.
| で区切られた各フィールドを二重引用符でくくって標準出力に出すawkスクリプト。 ExcelでCSV出力するときに二重引用符で囲めなかったので即興。
BEGIN {
FS="|"
}
{
for( i=1; i<=NF; i++ ) {
printf( "\"" $i "\"" ",")
}
printf("\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment