Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
icycrash6852yHere is the lte file I need to match these in the fcc2 file and change the 15 and 2 to be 50 and 5. but only for the lines that match the lte file.
-
Well, you got bash.
Read the lte file. Save it to a variable.
For every sed match, change that line with the variables you want.
Or if you feel fanceh, write a python script.
You already know how to parse the thing, tabs and newlines. -
icycrash6852y@melezorus34 My biggest problem is the output includes some from the fcc2 file that don't match numbers in the lte file.
-
@icycrash ask who gave the task for details. Maybe you just need to create new lines with missing ids
-
icycrash6852y@melezorus34 The only ones that need modified are all in the lte file. i'm just trying to figure out the best way to automate this because the only other option is by hand. There is 4800 id's in the lte file so by hand would take awhile.
-
@icycrash
Read lte
Get ids from lte to a array
Read fcc, iterate each line
change line if id is in array. Note the id into another array if it matches.
Output all ids that are not found (aka not in changed array) into another file.
Profit -
icycrash6852yI figured it out. The census blocks they gave me in the lte file are out of date and don't line up with the new ones in the fcc2 file. Long story short they screwed me with outdated info. @zlice @melezorus34
Related Rants
I got two files one called lte and the other called fcc2. The attached image is the fcc2 file. The first file is just a list of census blocks. 15 digit number per line on the lte file.I need help changing just the lines in the fcc2 file that have the same 15 digit number at the start of the line. Just need to change 2 variables in the line. FCC2 is a TSV file. any help would be appreciated.
question
help