Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

tsv to json bash

cat input.tsv | jq --raw-input --slurp 'split("
") | map(split("	")) | .[0:-1] | map( { "id": .[0], "ip": .[1] } )'
Source by www.commandlinefu.com #
 
PREVIOUS NEXT
Tagged: #tsv #json #bash
ADD COMMENT
Topic
Name
6+4 =