Search Results

Search: Posts Made By: dan139
2,711
Posted By dan139
Hi again - So after reexamining the output...
Hi again -

So after reexamining the output using the following command:

awk -F ',' 'FNR==NR {zip[$1]; next} $2 in zip' file2 file1

the output has less rows than file2 which is impossible....
2,201
Posted By dan139
This worked perfectly. Thanks. ----------...
This worked perfectly. Thanks.

---------- Post updated at 03:37 PM ---------- Previous update was at 03:31 PM ----------

Sorry One more question, if I wanted field 2 to be printed with quotes...
2,201
Posted By dan139
I produced my file by saving my excel spreadsheet...
I produced my file by saving my excel spreadsheet as a tab delimited file & then it produced a file with formatting like this:


9545641 123 "Neighbor and Labrador,Canada" 54895 'CANADA'...
2,201
Posted By dan139
I get the same exact output as before. There's no...
I get the same exact output as before. There's no change.
2,201
Posted By dan139
Thank you works perfectly with this line: awk...
Thank you works perfectly with this line:
awk -F '\t' '{print ""$1","$2","$3","$4","$5""}' file1.txt

However I'm trying to wrap the statement like
(8746512,789,"Neighbor and...
2,201
Posted By dan139
Trouble reading from a tab delimited excel file
So I have a file1.txt that is tab delimited:

e.g.

FIELD1 FIELD2 FIELD3 FIELD4 FIELD5
9545641 123 "Neighbor and Labrador,Canada" 54895 'CANADA'...
2,711
Posted By dan139
file 1: ID,Zip,Address,Parent,Country ...
file 1:

ID,Zip,Address,Parent,Country
9874125,43232,"493 Marietta St",21152,'United States'
4845622,85489,"434 Beach St",21542,'United States'
9874126,43234,"368 John's Creek Way",21122,'United...
Forum: Programming 06-01-2016
3,002
Posted By dan139
Difference between BEGIN TRANSACTION & START TRANSACTION?
What's the difference between BEGIN TRANSACTION vs START TRANSACTION?

Also goes for COMMIT TRANSACTION vs COMMIT?
2,711
Posted By dan139
Thanks for the reply. So I realized that my data...
Thanks for the reply. So I realized that my data in file 2, it has the Zipcode in column #2, not the last the column. would the command be:

awk 'FNR==NR {zip[$1]; next} $2 in zip' file1 file2
...
2,711
Posted By dan139
Added a more detailed response. let me know if...
Added a more detailed response. let me know if you need more clarification.

basically taking all of the zips from file 1 and getting the rows for those same zips in file 2.
2,711
Posted By dan139
Comparing two CSV files
I have two csv files and im trying to compare them. e.g.

SAMPLE DATA:

file one:

ZipCode Name
20878 Washington
10023 Missouri
20304 ...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 09:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy