#!/usr/bin/ksh #File's name: manyOrders.ksh #Author: Jen Chen #Updated on: #Copyrighted by Jen Chen #An example to extract the total per invoice number from the table #Order_Details.csv usingthe awk script Orders.awk to sum up the same #invoice number, then using theis Korn shell script to pass the parameters #to the Orders.awk script to process each invoice number individually. set `awk -F, '{print $1}' Order_Details.csv|sort -u` #for eachitem in $@ #do # echo $eachitem #done for eachInvoice in $@ do awk -f Orders.awk input=$eachInvoice Order_Details.csv done