Created
September 17, 2019 08:38
-
-
Save myuon/f3100b2e53fe0129380d1626c14d13c3 to your computer and use it in GitHub Desktop.
csv-sanitize
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
# https://www.quora.com/What-is-a-sed-script-that-will-remove-the-n-character-but-only-if-it-is-inside-characters-delimited-string-not-the-n-that-is-actually-at-the-end-of-the-virtual-line | |
$ mlr --csv --rs lf --implicit-csv-header --headerless-csv-output --quote-all put ' | |
for (col_no in $*) { | |
$[col_no]=gsub($[col_no], "\n", " \\\\n ") | |
} | |
' my.csv > sanitized.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment