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?
targetsdirectly withparallel? – Kusalananda Dec 02 '20 at 08:11readwithout-rwas 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:15IFSto a space character indicates that they either don't know what this does (and that omitting-rwas a mistake), or that they explicitly want to trim flanking spaces from the input data (in which case omitting-rmay have been on purpose also). Unfortunately, the question does not tell. – Kusalananda Dec 02 '20 at 08:31-ror provide a command to readtargetsdirectly withparallelthen please improve it. Unfortunately I have no time for this now. – Kamil Maciorowski Dec 02 '20 at 08:39