From: Lal, Neeraj (Neeraj.Lal@Pfizer.com)
Date: Mon Oct 07 2002 - 15:02:17 EDT
Hi Admin
I have written a script using awk to split or cut a file with , delimeted
file
here is my scripts
awk </medicaid/prod/qtrly/final1.tmp > /medicaid/prod/qtrly/final2.txt \
'
{
#Vendor Id
x1=substr($0,1,12);
#Facility ID
x2=substr($0,15,23);
#Facility Name
x3=substr($0,26,55);
#Address
x4=substr($0,58,87);
#City
x5=substr($0,90,104);
#State
x6=substr($0,122,123);
#Zip
x7=substr($0,134,138);
print x1","x2" ,"x3" ,"x4" ,",x5;
but after second feild I am not getting the comma and I am also getting the
3field as duplicate 02 times.
can somebody tell is there anything wrong in the script.
Thanks
Thanks,
Neeraj Lal
Consultant
CHC IS Application & Devlopment
Pfizer Inc.
Neeraj.Lal@Pfizer.com
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:20 EDT