If your file dynamically adds identifiers, you can unmount a small while to continue checking more data in the file, for example:
while IFS= read -d $'\n' -ra || sleep 1; do [[ -n "$a" ]] && curl -s "http://foo.bar/some.php?id=${a}"; done < lines.txt
Otherwise, if it is static, you can change sleep 1 to break , and it will read the file and exit when there is no data left, it is quite useful to know how to do this.
user4401178
source share