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 SkipVought 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. mrimagepueblo

    Compare two fields and create a third

    perfect, thank you again.
  2. mrimagepueblo

    Compare two fields and create a third

    that got it thank you. I really wish I could wrap my head around arrays for things like this. Do you have a url or a book you could recommend, preferably a dummies version. thank you very much here is what I did # insert First Name awk -F'|' ' FILENAME==ARGV[1] { firstname[$1,$2] = $3...
  3. mrimagepueblo

    Compare two fields and create a third

    you are correct, the agent id's are unique for each office id. the firstname[$14] is the actual position in the masterfile of the agent id. sorry not like in the example this is what I came up with but the field is empty in mastefile_temp.txt basically I'm just changing the array built up based...
  4. mrimagepueblo

    Compare two fields and create a third

    I have two files that I would like to lookup id's for and add their corresponding values to the end of a master file. I can do this in Microsoft Access, but don't really want to. The office file has a structure of Office ID|Office Name|Address|City|... etc. The agent file has a structure of...
  5. mrimagepueblo

    Extracting and printing variables from array

    form_data is coming from db-lib.pl, and the program also uses cgi-lib.pl. I know, those programs are as old a dirt, but it has worked well for my requirements to this point. For each row the current row shows when I print print "$row\n"; which is what's expected at this point. So what I'm...
  6. mrimagepueblo

    Extracting and printing variables from array

    I am attempting to print the results of an array, @database rows which shows the results of 5 records in my database. I need to populate showAddress with each record in the array to put those fancy markers in a google map. If I manually put showAddress in the spot below 5 times with 5 address...
  7. mrimagepueblo

    awk array to add text to a file

    GNU Awk 3.1.3 I'll try a progressive set of 3000 records at a time and report back and let you know. Thanks again.
  8. mrimagepueblo

    awk array to add text to a file

    Thank you so much, it's exactly the snippet I was looking for and I think I can even follow the logic. Not nearly as troublesome/cumbersome as I thought it would be. I have a follow up question that has to do with the durability of the array. In a couple of circumstances fileb.txt could be...
  9. mrimagepueblo

    awk array to add text to a file

    I see another post that is almost what I'm looking for but thought I'd ask about my specific circumstance. Maybe between your input here and the other post I can figure out what I need. I'd like to get away from using microsoft access to do these queries. I know how to do this in a #!/bin/sh...
  10. mrimagepueblo

    Prepend and Append to a field

    That's what I was looking for. Thank you!
  11. mrimagepueblo

    Prepend and Append to a field

    Using /bin/sh shell script. I have to pull fields from a bigger file, no problem there, I'm just clueless on adding something to the beginning and the end of a field. I have a pipe delimited file as such: I'll only use one line for the example: 12345 will always match, as I'm just duplicating...
  12. mrimagepueblo

    Strip first part of filename with awk statement

    Works like a charm thank you. Thanks for sticking with me.
  13. mrimagepueblo

    Strip first part of filename with awk statement

    I did, I get a command not found. I was even in the directory and just ran ls ??-*.jpg | awk '{print mv" "$1" "substr($1,4)}' | sh and I get the command not found???
  14. mrimagepueblo

    Strip first part of filename with awk statement

    The same directory is fine if that is possible. If not I could move them to a temp directory /path/to/dir/temp.
  15. mrimagepueblo

    Strip first part of filename with awk statement

    That command echos to the console fine but the files are not renamed when it's complete?
  16. mrimagepueblo

    Strip first part of filename with awk statement

    I need to write a bash shell script to strip the first part of the filename in a directory of files. The original filenames are 05-12345_1.jpg 05-12345_2.jpg 05-12345_3.jpg 06-56789_1.jpg 06-56789_2.jpg 06-56789_3.jpg 06-56789_4.jpg etc. I simply want to strip out the 05- or 06- whatever...
  17. mrimagepueblo

    how to open a 2nd file and loop through the lines

    KevinADC I got it figured out! For what it's worth. I added the three lines at the end of the routine you suggesed. I'm guessing that what it does is zero out the array from the results of the previous line. I kept going over your comments and in looking at how some of the other code works in...
  18. mrimagepueblo

    how to open a 2nd file and loop through the lines

    I really, really appreciate your taking the time to help me out. It is an old script I picked up long ago and have been banging away at it. I've learned a little and as you can tell, I have a long way to go in my understanding of perl. I couldn't find anything about payment in the rules, but I...
  19. mrimagepueblo

    how to open a 2nd file and loop through the lines

    I need to clarify one thing. I did not take out the # in the form_data statements. If I add the # in the form_Data it gives me all the records. here is what I have currently. I took the closing bracket } and moved it all the way to the bottom of the script. open (KEYWORDFILE, "test.txt") ||...
  20. mrimagepueblo

    how to open a 2nd file and loop through the lines

    I was messing with the chop vs chomp. It should be chomp no doubt. You actually have me very close with your last suggestion. I moved the } down to the very end of the script. I'm now getting the three emails that I should, based on three lines in the test.txt. What's weird is now it looks...

Part and Inventory Search

Back
Top