I am learning GNU parallel and I wonder it this makes sense:
bash:
IFS=" "
while read field || [ -n "$field" ]; do
targets_array+=("$field")
done </location/targets
parallel -Dall bash myScript.sh ::: $targets_array
I wonder if it makes sense because my output seem to stop at some point... I have 30.000 targets that I scan with myScript.sh then I update info about them in DB also using myScript.sh
I tried to use some options but I could not make it work: like writing to a logfile from the performance point of view, does it make sense to run one target at the time?
targets
directly withparallel
? – Kusalananda Dec 02 '20 at 08:11read
without-r
was an educated decision. I'm not aware of GNUparallel
's ability to handle backslash equivalently. Can it do this? – Kamil Maciorowski Dec 02 '20 at 08:15IFS
to a space character indicates that they either don't know what this does (and that omitting-r
was a mistake), or that they explicitly want to trim flanking spaces from the input data (in which case omitting-r
may have been on purpose also). Unfortunately, the question does not tell. – Kusalananda Dec 02 '20 at 08:31-r
or provide a command to readtargets
directly withparallel
then please improve it. Unfortunately I have no time for this now. – Kamil Maciorowski Dec 02 '20 at 08:39