LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2020, 11:02 AM   #16
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled

Quote:
Originally Posted by fatmac View Post
Quote:
....command to open up a csv file for display.
The sc (spreadsheet calculator) program can do that for you.
True if using the fork sc-im, but unfortunately not quite so true for the original sc.

Similarly, the venerable GNU Oleo docs say it can import from CSV directly, while the active fork Neoleo recommends doing this via provided Python script:
Code:
python3 csv2hless.py <data.csv | neoleo -H
Well, theoretically it can import from CSV directly, too, but practically, this works only with simplest CSV data. And I believe the original Oleo would have had problems with complex CSV data as well, I just haven't tried it out in ages.

Also, be aware that WWW::Splunk as packaged on some distributions may include a competely unrelated /usr/bin/sc (Splunk Client).

For the sake of completeness, let's also mention tabview, although their own README recommends using VisiData for more complex tasks.

Last edited by shruggy; 05-09-2020 at 01:51 PM.
 
Old 05-09-2020, 01:51 PM   #17
WideOpenSkies
Member
 
Registered: May 2019
Location: /home/
Distribution: Arch Linux
Posts: 166

Rep: Reputation: 61
VisiData is good for when the data is cleaned and ready to be analyzed.
 
Old 05-09-2020, 01:59 PM   #18
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
You can clean up data from inside VisiData, too.
 
Old 05-09-2020, 05:49 PM   #19
WideOpenSkies
Member
 
Registered: May 2019
Location: /home/
Distribution: Arch Linux
Posts: 166

Rep: Reputation: 61
Open Refine is my go-to program for cleaning data when code, for whatever reason, can't cut it.
 
Old 05-15-2020, 08:36 AM   #20
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by Contrapak View Post
Perhaps you can use a combination of substitution and sed commands to get around the tabs and quotes? From your sample, it seems like separating by commas is possible.
It gets more complex. CSV isn't really well-defined and in practice such files can be full of a lot of weirdness.

However, for files generated in-house, you'd have control over how the file is set up and what is used to mark fields and records. Then it would not be a hard problem.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
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] A challenging script - Replace field of CSV file based on another CSV file arbex5 Programming 11 06-12-2013 06:56 AM
[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
Map 1 CSV's columns to matching columns in another CSV 2legit2quit Programming 7 10-27-2011 08:53 AM
Comparing two csv files and write different record in third CSV file irfanb146 Linux - Newbie 3 06-30-2008 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:04 PM.

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