shell读取txt文件,更改json参数

#!/bin/bash

name="/home/data/"
for line in $(cat test_scene_name.txt)
    do
        address=${name}${line}
        echo ${address}
        contents="$(jq --arg a "$address" '.path_dataset = $a' /home/data/Open3D-0.16.1/examples/python/reconstruction_system/config/nyu_depth_v2.json)" && \
        echo -E "${contents}" > /home/data/Open3D-0.16.1/examples/python/reconstruction_system/config/nyu_depth_v2.json

        python3 run_system.py --config "/home/data/Open3D-0.16.1/examples/python/reconstruction_system/config/nyu_depth_v2.json" --make --register --refine --integrate
    done

你可能感兴趣的:(Python,python)