Hi,
I need to execute parallel with while loop.
Input File(source_file.csv) contains filenames the below
source_file.csv file contains
Customer1.txt
Product1.txt
Sales.txt
Emp.txt
Dept.txt
Based on the number of rows that file I want to run the script �n' times.
while source_file.csv|read line
do
cat $line # I am applying some logic
done
the script should run in parallel. I am having some problem with the while loop.
Any help greatly appreciated.
Thanks -suri
"run in parallel" means? For each line in the csv file we can trigger the script.
Whats wrong with your while loop? Try this...
#!/bin/ksh
while read line
do
echo $line
# execute your script here
done < source_file.csv
regards,
Ahamed
Hi
source_file.csv contains the
1,Customer1.txt
2,Product1.txt
3,Sales.txt
4,Emp.txt
5,Dept.txt
Thanks for the quick responce. The script running sequentially but i want to run the script in parallel.
cat source_file.csv | awk -F"," '{print $2}' |grep -v ^$|
while read line
do
echo $line
#some other logic present here
done
thanks -suri