Linux - Take advantage of the number of CPUs you have; start concurrent jobs
In my professional activity, I've been faced with the following requirement: process each line of a CSV file and make a POST API call to upload a document.
One line of the CSV contained information that needed to be communicated to an API service, and each line corresponded to a PDF file. So if there are 1000 lines in the CSV file, I have to make 1000 API calls to upload 1000 PDFs.
I wrote my script in Linux Bash and then it was time to optimise: not just one API call at a time, but as many as possible.
Let's how we can start more than one task at a time using Linux Bash.