./test.sh: line 9: let: =: syntax error: operand expected (error token is "=")
290 2890 2883
list=$(psql -t -h hostname -U user -d database "Select id from table")
echo $list
输出:-
for id in list; do
task_id="$(curl -u user:passwd https:/abc/${id}/summary)"
echo "$task_id" >> task.json
done
所需的输出:-
我也想附加ID,以提取摘要。看起来应该像
task_id = [{"a":10},{"b":400},{"d":39}]
将ID附加到变量后,我将附加数据task.json文件。