I would like to improve a simple script i made.While it works fine for a single argument and does what i want i have issues making it to run in parallel or at the same time for all my argument values.I would like to improve it to run on multiple arguments and output my grep findings at the same time and not in sequence, while is not the good choice ? Any help to make this output work would be really appreciated. Thank you very much.i have multiple files file1.logfile1.txtfile2.logfile2.txtneed to grep something from *.log and something from *.txtoutput the grep lines for all arguments into the same echo. my  script  so far looks like this :#!/bin/bashfilename=$@error=$(grep  'ERROR' ${filename}.l)phone=$(grep 'phone'  ${filename}.e)invalid=$(grep  'invalid' ${filename}.l)while true ; do echo -e   Start of message \n :           $error \n         $invalid \n        $phone \n          End of message \n break done exitThis is how i would like the output to lookStart of message error form  file1Phone number from file1Invalid from file1error form  file2Phone number from file2Invalid from file2error form  file3Phone number from file3Invalid from file3 etc End of message 
grep script - output lines at the same time into echo
bash;shell script;grep;echo;output