Commissario
Hi folks,
After a couple of hours of messing around with this, I'm struggling.
I have two files, one is a text file consisting of a a bunch of numbers in this format
123556
213452
529521
134525
The second is a csv, the rows are quite long but it's a standard csv, nothing special. That csv starts with a six digit number.
I need to search the csv for any rows that start with a number from the first file and then move that entire row out to a new file. Moving it might be tricky, it may be easier just to copy the row into a new file.
The column of numbers is about 1500 numbers long and the csv is about 45,000 so it's quite a big job.
With how well *nix works with text files, I thought this would be quite straightforward but I'm struggling.
Can anyone help please?
Thanks.
After a couple of hours of messing around with this, I'm struggling.
I have two files, one is a text file consisting of a a bunch of numbers in this format
123556
213452
529521
134525
The second is a csv, the rows are quite long but it's a standard csv, nothing special. That csv starts with a six digit number.
I need to search the csv for any rows that start with a number from the first file and then move that entire row out to a new file. Moving it might be tricky, it may be easier just to copy the row into a new file.
The column of numbers is about 1500 numbers long and the csv is about 45,000 so it's quite a big job.
With how well *nix works with text files, I thought this would be quite straightforward but I'm struggling.
Can anyone help please?
Thanks.