I have given sets of different input files as shown sample below
cat out.txt
[
{
"regional_unit": "node",
"source_name": "1753250187_SPS",
"technology": "STP",
"temporal_unit": "15min",
"timestamp_column_name": "collectTime",
"timestamp_column_pattern": "yyyyMMddHHmmss",
"vendor": "HUA"
}
]
I want to read such files from the directory and want to remove [ & ] and also the empty spaces
jq -c '.[]' out.txt? Do you want to modify the files in place or just output the result? Can the arrays have more than one element? Can you post the expected output?