Created
December 19, 2017 21:45
-
-
Save jaw111/88fc9e97ed9bbb8e2551c612c7a69d0b to your computer and use it in GitHub Desktop.
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 myFile.nt | \ | |
sed -E 's|<(.*)> <(.*)> <(.*)> \.|{ "@id": "\1", "\2": { "@id": "\3" } }|' | \ | |
sed -E 's|<(.*)> <(.*)> "(.*)" \.|{ "@id": "\1", "\2": "\3" }|' | \ | |
sed -E 's|<(.*)> <(.*)> "(.*)"\^\^<http://www.w3.org/2001/XMLSchema#string> \.|{ "@id": "\1", "\2": "\3" }|' | \ | |
sed -E 's|<(.*)> <(.*)> "(.*)"\^\^<(.*)> \.|{ "@id": "\1", "\2": { "@values": "\3", "@type": "\4" } }|' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment