I have several .json
files similar to this.
{
"AcquisitionNumber": 1,
"TotalReadoutTime": 0.035,
"IntendedFor": "func/sub-02_task-rest_run-01_bold.nii.gz"
}
I want to change the sub number in the "IntendedFor" line using a bash variable, looping over different subs.For example if sub is 03:
sub=03
echo $sub
03
How can I change the value of sub-02
to sub-03
using this bash variable?