Skip to content

Instantly share code, notes, and snippets.

@arc279
Last active March 29, 2017 11:01
Show Gist options
  • Save arc279/127d266c7450dbaf38e7703bd9b5edee to your computer and use it in GitHub Desktop.
Save arc279/127d266c7450dbaf38e7703bd9b5edee to your computer and use it in GitHub Desktop.
欠損のあるtsvをjsonに整形
#!/bin/bash
cat a.tsv | nkf -Lu | \
while IFS=$'\n' read x; do
echo "$x" | tr "\t" "\n" | while read y; do
# unquote
echo "$(eval echo $y)"
done | jo -a
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment