I haven't explained this question enough so it was misunderstood as duplicate.
I want to read N lines each time of a CSV file and execute a script that operates the lines (names). How can I send N lines as an argument to another script and execute it in parallel?
The file is a CSV with +400000 lines like this:
nombre,ape_paterno,ape_materno
ALFREDO,AGUILAR,AGUILAR
ANGEL,AGUILAR,AGUILAR
CARLOS,AGUILAR,AGUILAR
DANIEL,AGUILAR,AGUILAR
EDUARDO,AGUILAR,AGUILAR
ELIZABETH,AGUILAR,AGUILAR
FERNANDO ,AGUILAR,AGUILAR
FRANCISCA,AGUILAR,AGUILAR
FRANCISCO ,AGUILAR,AGUILAR
FRANCISCO JAVIER,AGUILAR,AGUILAR
...
I want something like this:
{
read
while IFS="," read $N lines
do
sh ${DIR}/Downloader.sh $N-Lines-as-argument &
done } < "$input"
wait
I have tried the answers from here but my result gives null.