LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-28-2021, 02:13 PM   #16
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25

Quote:
Originally Posted by shruggy View Post
Interestingly, recently there was another thread about these data.
GOOD CATCH. Automating the download process using lynx is a great addition, gets me outta the loop. Thanks.
 
Old 03-28-2021, 02:23 PM   #17
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Rather than lynx, I'd do it with cURL. See my post #6 there.

Last edited by shruggy; 03-29-2021 at 03:16 AM.
 
Old 03-28-2021, 02:27 PM   #18
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by shruggy View Post
No, I would do it not with lynx, but rather with cURL. See my post #6 there.
Roger that, will look at it. Thanks
 
Old 04-12-2021, 02:20 PM   #19
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
After some testing I ended up with: sort -g -u file1 file2 -o file3
The -g resolves issues with sorting numerically on the .csv. I tried -n but sometimes the second field in the .csv would confuse things. So far the -g is working.
Thanks again, esp, wpeckham.
 
Old 04-12-2021, 07:26 PM   #20
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
You are very welcome, and I am very glad that worked well for you!
 
Old 04-15-2021, 05:31 PM   #21
rdx
Member
 
Registered: Apr 2007
Location: Dallas
Distribution: Slackware64 14.2
Posts: 283

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by rdx View Post
After some testing I ended up with: sort -g -u file1 file2 -o file3
The -g resolves issues with sorting numerically on the .csv. I tried -n but sometimes the second field in the .csv would confuse things. So far the -g is working.
Thanks again, esp, wpeckham.
I was wrong, -g and -u are conflicting somehow. I don't know what the deal is but be warned, these two "-g -u" don't play well together.
 
Old 04-16-2021, 08:45 AM   #22
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
That makes sense. Sort -u only works if the data (files) are already sorted, -g changes the sort order.
 
  


Reply

Tags
csv



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
For multiple csv files how do I add the value of one particular entry in any given csv to that csv's name? sean mckinney Programming 8 01-22-2021 09:46 AM
LXer: How To Empty a File, Delete N Lines From a File, Remove Matching String From a File, And Remove Empty/Blank Lines From a File In Linux LXer Syndicated Linux News 0 11-22-2017 12:30 PM
How to print lines in csv file if 1 csv column field = "text". There are 10 column (;) in csv file nexuslinux Linux - Newbie 9 04-22-2016 11:35 PM
[SOLVED] How to script csv editing? Remove rows from csv file that do not contain certain text ingram87 Linux - Software 9 08-03-2012 12:45 PM
CSV file - Duplicate records need merging | BASH? lmedland Programming 21 12-10-2010 05:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration