Basic idea here is to call 1 file from the asd directory and 1 line from the output.txt file in each curl call:
#!/bin/bash
python MJD.py -> output.txt
FILES=/home/user/asd/*
for f in $FILES
do
filename="$output.txt"
while read -r line
do
curl -F ID='zero' -F dir="@$f" -F TIME="$line" -F outputFormat=json "http://blabla"
done
done
This code actually calls the python script and saves the output inside the output.txt file. The output file is just 1 number on each line for several lines. Now what I want to do is to get, starting from the first line, for -F TIME=" one value inside the text file".
I don't know what part of my code is causing the problem. When I call this script the part calling the files from dir works but for every time the TIME=0 appears on screen, looks like nothing is read from the output.txt file.. What am I missing here?