I have a JSON log file test.log:{type:1,fname:AAA,lname:bbb }    {type:2,state:gujarat }     {type:3,city:ahmedabad }    {type:3,city:rajkot }   {type:1,fname:ccc,lname:ddd }    I run the following commandscat test.log | jq -c select(.type==\1\)|{fname:.fname} > type_1.txt     cat test.log | jq -c select(.type==\3\)|{city:.city} > type_3.txt   Is it possible for a single jq command to generate multiple output files?I want to run the jq command only one time on the test.log file and generate an output file for each item type.
single jq command with multiple output possible?
shell script;json