Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. chilecayenne

    getline in BEGIN section, can't seem to use variable as filename? Opti

    Hello all, I'm making progress on my first awk script in a LONG time. I'm trying to now make it a bit more versitile...and send in file names as variables on the command line, rather than hard coded in, but I'm having problems. Example...this works BEGIN { FS="|"; OFS="|"; while (getline <...
  2. chilecayenne

    Reading a file into 2x dimensional array; can't read in body

    Ok...I think I solved this one. Not exactly sure what happened...the hard coding of the values in the array read never worked...BUT, when I put in some real values that matched in the bxm_array[$2,$8] section...it started returning meaningful values. So, SOLVED on this one.. Thank you, CC
  3. chilecayenne

    Reading a file into 2x dimensional array; can't read in body

    Without seeing your input data it's a bit difficult to answer. A few comments on the code though; no need for split when you have defined the FS, even with getline awk will split the fields for you automatically. Also, why assign things to variables unnecessarily. The existing code can be...
  4. chilecayenne

    Reading a file into 2x dimensional array; can't read in body

    Hi all, I'm trying my hand at awk again, but just can't seem to get things going. I'm starting this to try to load one file into a 2x dimensional array, and in the body, search it to match on fields of the file I'm processing and append some values for output. This is in the early...

Part and Inventory Search

Back
Top