Created
September 28, 2012 14:21
-
-
Save ctavan/3800152 to your computer and use it in GitHub Desktop.
Convert list of strings to valid JSON array for loading in node.js
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
cat list.txt | sed 's/\(.*\)/"\1",/;1s/^/[/;$s/.$/]/' > list.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment