I have a file with tab separated values such as:
"1" "12345" "abc" "def"
"2" "67890" "abc" "ghi"
"3" "13578" "jkl" "mno"
I can't figure out how to take arbitrary numbers from an input file and, if the first 5 digits match what is in the second column of the input file, then every thing on that line will be exported into another file.
Ex: input file: "67890123"
output file: "2" "67890" "abc" "ghi"
{"12345": ("1", "12345", "abc", "def"), "67890": ("2", "67890", ...)...}then simply index into the dictionary with the first 5 digits of the input.