Quote:
Originally posted by thejeffe
For example I have the following text file:
I would like a line in the script to return a true if the word Invoice is located in row 1 colum 12. Other forms could have Quote, Purchase Order, etc... in the same location. I am to do something dfferent for each different form.
thanks
|
hi!
just a try to ur problem,
i understand that at row 1 col 12 there can be values like invoice,Quote,Purchase Order,etc. and depending on these values u need to call different script/redirection(correct me if i am wrong)
if my understanding is correct then u can extract what is contained in row1 col12 using it
val=`awk '{ if (NR==1) print $12}' filename.txt`
now $val contains values like Invoice/Quote/PurchaseOrder
now u can use case on $val values and do redirection accordingly.
hope this is what u want.
--Pooja