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...
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...
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...
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...
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...
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...
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...
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...
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???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.