Unix command-Line CSV viewer [closed]











up vote
8
down vote

favorite












Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)?



I find it easy to simply edit CSV files by writing it manually (since all you need to do it comma delimit the columns), but is there a way to view it in a slightly nicer UI on the command-line?










share|improve this question















closed as off-topic by Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80 Dec 9 at 4:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
    – LawrenceC
    Mar 29 '11 at 13:41










  • Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
    – vonhogen
    Mar 29 '11 at 15:48















up vote
8
down vote

favorite












Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)?



I find it easy to simply edit CSV files by writing it manually (since all you need to do it comma delimit the columns), but is there a way to view it in a slightly nicer UI on the command-line?










share|improve this question















closed as off-topic by Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80 Dec 9 at 4:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
    – LawrenceC
    Mar 29 '11 at 13:41










  • Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
    – vonhogen
    Mar 29 '11 at 15:48













up vote
8
down vote

favorite









up vote
8
down vote

favorite











Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)?



I find it easy to simply edit CSV files by writing it manually (since all you need to do it comma delimit the columns), but is there a way to view it in a slightly nicer UI on the command-line?










share|improve this question















Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)?



I find it easy to simply edit CSV files by writing it manually (since all you need to do it comma delimit the columns), but is there a way to view it in a slightly nicer UI on the command-line?







command-line unix csv viewer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 18 '11 at 15:41









3498DB

15.6k114762




15.6k114762










asked Mar 29 '11 at 13:21









vonhogen

1,05441936




1,05441936




closed as off-topic by Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80 Dec 9 at 4:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80 Dec 9 at 4:15


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Kamil Maciorowski, Twisty Impersonator, bertieb, PeterH, VL-80

If this question can be reworded to fit the rules in the help center, please edit the question.












  • Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
    – LawrenceC
    Mar 29 '11 at 13:41










  • Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
    – vonhogen
    Mar 29 '11 at 15:48


















  • Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
    – LawrenceC
    Mar 29 '11 at 13:41










  • Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
    – vonhogen
    Mar 29 '11 at 15:48
















Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
– LawrenceC
Mar 29 '11 at 13:41




Can you be more specific on how you want the output formatted? CSV's are easily to manipulate with shell tools so there's likely a string of four or five shell commands that can format them any way you like for convenient viewing.
– LawrenceC
Mar 29 '11 at 13:41












Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
– vonhogen
Mar 29 '11 at 15:48




Well, more or less like it's shown in Excel. Having the columns aligned and properly spaced with proper underlining, if possible.
– vonhogen
Mar 29 '11 at 15:48










6 Answers
6






active

oldest

votes

















up vote
5
down vote



accepted










sc is a command-line spreadsheet program that's been around a long time, likely available in your package manager. Here's a Linux Journal intro article to it:




http://www.linuxjournal.com/article/10699







share|improve this answer























  • Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
    – user74094
    Dec 17 '11 at 22:55






  • 1




    sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
    – Nathaniel M. Beaver
    Jan 3 '17 at 1:32




















up vote
3
down vote













It seems like this question overlaps (at least partially) with my similar question on StackOverflow:



Command line CSV viewer?



The top answer there is currently:



column -s, -t < somefile.csv | less -#2 -N -S


(Please see the link for more details.)






share|improve this answer






























    up vote
    3
    down vote













    The powerful program vim have a plugin for .csv files in CSV Plugin and its screenshot is



    enter image description here






    share|improve this answer




























      up vote
      3
      down vote













      There's a tool, CSVfix, which helps with viewing CSV files.




      CSVfix is a command-line stream editor
      specifically designed to deal with CSV
      data. With it you can, among other
      things:




      • Convert fixed format, multi-line and DSV files to CSV

      • Reorder, remove, split and merge fields

      • Convert case, trim leading & trailing spaces

      • Search for specific content using regular expressions

      • Filter out duplicate data or data on exclusion lists

      • Perform sed/perl style editing

      • Enrich with data from other sources

      • Add sequence numbers and file source information

      • Split large CSV files into smaller files based on field contents

      • Perform arithmetic calculations on individual fields

      • Validate CSV data against a collection of validation rules

      • Convert between CSV and fixed format, XML, SQL and DSV

      • Summarise CSV data, calculating averages, modes, frequencies etc.




      A simple way to view CSV files on the command-line is to pipe the .csv file into the column utility with the column delimiter set as a comma:



      column -s, -t yourfile.csv





      share|improve this answer



















      • 1




        Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
        – RedGrittyBrick
        Apr 17 '11 at 7:44












      • Yes that's a fair point, I'll edit.
        – 3498DB
        Apr 17 '11 at 7:46


















      up vote
      1
      down vote













      emacs csv-nav mode will show the csv file and open single records in a text buffer for you to edit and save back to the original buffer






      share|improve this answer




























        up vote
        1
        down vote













        I know this question is already quite old, but I want to add another tool, which I found very convenient:



        tabview (https://github.com/TabViewer/tabview)



        The header line of the csv file will always stay at the top and there are many more features.



        enter image description here






        share|improve this answer




























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          5
          down vote



          accepted










          sc is a command-line spreadsheet program that's been around a long time, likely available in your package manager. Here's a Linux Journal intro article to it:




          http://www.linuxjournal.com/article/10699







          share|improve this answer























          • Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
            – user74094
            Dec 17 '11 at 22:55






          • 1




            sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
            – Nathaniel M. Beaver
            Jan 3 '17 at 1:32

















          up vote
          5
          down vote



          accepted










          sc is a command-line spreadsheet program that's been around a long time, likely available in your package manager. Here's a Linux Journal intro article to it:




          http://www.linuxjournal.com/article/10699







          share|improve this answer























          • Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
            – user74094
            Dec 17 '11 at 22:55






          • 1




            sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
            – Nathaniel M. Beaver
            Jan 3 '17 at 1:32















          up vote
          5
          down vote



          accepted







          up vote
          5
          down vote



          accepted






          sc is a command-line spreadsheet program that's been around a long time, likely available in your package manager. Here's a Linux Journal intro article to it:




          http://www.linuxjournal.com/article/10699







          share|improve this answer














          sc is a command-line spreadsheet program that's been around a long time, likely available in your package manager. Here's a Linux Journal intro article to it:




          http://www.linuxjournal.com/article/10699








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 10 '11 at 4:34









          3498DB

          15.6k114762




          15.6k114762










          answered Jul 9 '11 at 22:49









          Celsius1414

          8412




          8412












          • Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
            – user74094
            Dec 17 '11 at 22:55






          • 1




            sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
            – Nathaniel M. Beaver
            Jan 3 '17 at 1:32




















          • Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
            – user74094
            Dec 17 '11 at 22:55






          • 1




            sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
            – Nathaniel M. Beaver
            Jan 3 '17 at 1:32


















          Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
          – user74094
          Dec 17 '11 at 22:55




          Not so hot on cygwin it seems: http://stackoverflow.com/questions/8545813/which-library-defines-these-symbols-nmgetch-kbd-again-initkbd-resetkbd
          – user74094
          Dec 17 '11 at 22:55




          1




          1




          sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
          – Nathaniel M. Beaver
          Jan 3 '17 at 1:32






          sc reads colon-delimited files, not CSV files: linuxjournal.com/article/10699?page=0,1
          – Nathaniel M. Beaver
          Jan 3 '17 at 1:32














          up vote
          3
          down vote













          It seems like this question overlaps (at least partially) with my similar question on StackOverflow:



          Command line CSV viewer?



          The top answer there is currently:



          column -s, -t < somefile.csv | less -#2 -N -S


          (Please see the link for more details.)






          share|improve this answer



























            up vote
            3
            down vote













            It seems like this question overlaps (at least partially) with my similar question on StackOverflow:



            Command line CSV viewer?



            The top answer there is currently:



            column -s, -t < somefile.csv | less -#2 -N -S


            (Please see the link for more details.)






            share|improve this answer

























              up vote
              3
              down vote










              up vote
              3
              down vote









              It seems like this question overlaps (at least partially) with my similar question on StackOverflow:



              Command line CSV viewer?



              The top answer there is currently:



              column -s, -t < somefile.csv | less -#2 -N -S


              (Please see the link for more details.)






              share|improve this answer














              It seems like this question overlaps (at least partially) with my similar question on StackOverflow:



              Command line CSV viewer?



              The top answer there is currently:



              column -s, -t < somefile.csv | less -#2 -N -S


              (Please see the link for more details.)







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 23 '17 at 12:41









              Community

              1




              1










              answered Dec 11 '12 at 21:08









              Benjamin Oakes

              1,68221629




              1,68221629






















                  up vote
                  3
                  down vote













                  The powerful program vim have a plugin for .csv files in CSV Plugin and its screenshot is



                  enter image description here






                  share|improve this answer

























                    up vote
                    3
                    down vote













                    The powerful program vim have a plugin for .csv files in CSV Plugin and its screenshot is



                    enter image description here






                    share|improve this answer























                      up vote
                      3
                      down vote










                      up vote
                      3
                      down vote









                      The powerful program vim have a plugin for .csv files in CSV Plugin and its screenshot is



                      enter image description here






                      share|improve this answer












                      The powerful program vim have a plugin for .csv files in CSV Plugin and its screenshot is



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 11 '15 at 3:44









                      shgnInc

                      335316




                      335316






















                          up vote
                          3
                          down vote













                          There's a tool, CSVfix, which helps with viewing CSV files.




                          CSVfix is a command-line stream editor
                          specifically designed to deal with CSV
                          data. With it you can, among other
                          things:




                          • Convert fixed format, multi-line and DSV files to CSV

                          • Reorder, remove, split and merge fields

                          • Convert case, trim leading & trailing spaces

                          • Search for specific content using regular expressions

                          • Filter out duplicate data or data on exclusion lists

                          • Perform sed/perl style editing

                          • Enrich with data from other sources

                          • Add sequence numbers and file source information

                          • Split large CSV files into smaller files based on field contents

                          • Perform arithmetic calculations on individual fields

                          • Validate CSV data against a collection of validation rules

                          • Convert between CSV and fixed format, XML, SQL and DSV

                          • Summarise CSV data, calculating averages, modes, frequencies etc.




                          A simple way to view CSV files on the command-line is to pipe the .csv file into the column utility with the column delimiter set as a comma:



                          column -s, -t yourfile.csv





                          share|improve this answer



















                          • 1




                            Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                            – RedGrittyBrick
                            Apr 17 '11 at 7:44












                          • Yes that's a fair point, I'll edit.
                            – 3498DB
                            Apr 17 '11 at 7:46















                          up vote
                          3
                          down vote













                          There's a tool, CSVfix, which helps with viewing CSV files.




                          CSVfix is a command-line stream editor
                          specifically designed to deal with CSV
                          data. With it you can, among other
                          things:




                          • Convert fixed format, multi-line and DSV files to CSV

                          • Reorder, remove, split and merge fields

                          • Convert case, trim leading & trailing spaces

                          • Search for specific content using regular expressions

                          • Filter out duplicate data or data on exclusion lists

                          • Perform sed/perl style editing

                          • Enrich with data from other sources

                          • Add sequence numbers and file source information

                          • Split large CSV files into smaller files based on field contents

                          • Perform arithmetic calculations on individual fields

                          • Validate CSV data against a collection of validation rules

                          • Convert between CSV and fixed format, XML, SQL and DSV

                          • Summarise CSV data, calculating averages, modes, frequencies etc.




                          A simple way to view CSV files on the command-line is to pipe the .csv file into the column utility with the column delimiter set as a comma:



                          column -s, -t yourfile.csv





                          share|improve this answer



















                          • 1




                            Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                            – RedGrittyBrick
                            Apr 17 '11 at 7:44












                          • Yes that's a fair point, I'll edit.
                            – 3498DB
                            Apr 17 '11 at 7:46













                          up vote
                          3
                          down vote










                          up vote
                          3
                          down vote









                          There's a tool, CSVfix, which helps with viewing CSV files.




                          CSVfix is a command-line stream editor
                          specifically designed to deal with CSV
                          data. With it you can, among other
                          things:




                          • Convert fixed format, multi-line and DSV files to CSV

                          • Reorder, remove, split and merge fields

                          • Convert case, trim leading & trailing spaces

                          • Search for specific content using regular expressions

                          • Filter out duplicate data or data on exclusion lists

                          • Perform sed/perl style editing

                          • Enrich with data from other sources

                          • Add sequence numbers and file source information

                          • Split large CSV files into smaller files based on field contents

                          • Perform arithmetic calculations on individual fields

                          • Validate CSV data against a collection of validation rules

                          • Convert between CSV and fixed format, XML, SQL and DSV

                          • Summarise CSV data, calculating averages, modes, frequencies etc.




                          A simple way to view CSV files on the command-line is to pipe the .csv file into the column utility with the column delimiter set as a comma:



                          column -s, -t yourfile.csv





                          share|improve this answer














                          There's a tool, CSVfix, which helps with viewing CSV files.




                          CSVfix is a command-line stream editor
                          specifically designed to deal with CSV
                          data. With it you can, among other
                          things:




                          • Convert fixed format, multi-line and DSV files to CSV

                          • Reorder, remove, split and merge fields

                          • Convert case, trim leading & trailing spaces

                          • Search for specific content using regular expressions

                          • Filter out duplicate data or data on exclusion lists

                          • Perform sed/perl style editing

                          • Enrich with data from other sources

                          • Add sequence numbers and file source information

                          • Split large CSV files into smaller files based on field contents

                          • Perform arithmetic calculations on individual fields

                          • Validate CSV data against a collection of validation rules

                          • Convert between CSV and fixed format, XML, SQL and DSV

                          • Summarise CSV data, calculating averages, modes, frequencies etc.




                          A simple way to view CSV files on the command-line is to pipe the .csv file into the column utility with the column delimiter set as a comma:



                          column -s, -t yourfile.csv






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 20 '17 at 16:20

























                          answered Apr 17 '11 at 7:23









                          3498DB

                          15.6k114762




                          15.6k114762








                          • 1




                            Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                            – RedGrittyBrick
                            Apr 17 '11 at 7:44












                          • Yes that's a fair point, I'll edit.
                            – 3498DB
                            Apr 17 '11 at 7:46














                          • 1




                            Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                            – RedGrittyBrick
                            Apr 17 '11 at 7:44












                          • Yes that's a fair point, I'll edit.
                            – 3498DB
                            Apr 17 '11 at 7:46








                          1




                          1




                          Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                          – RedGrittyBrick
                          Apr 17 '11 at 7:44






                          Use column -s, -t yourfile.csv. Whenever you see cat file | command consider command file or command < file first.
                          – RedGrittyBrick
                          Apr 17 '11 at 7:44














                          Yes that's a fair point, I'll edit.
                          – 3498DB
                          Apr 17 '11 at 7:46




                          Yes that's a fair point, I'll edit.
                          – 3498DB
                          Apr 17 '11 at 7:46










                          up vote
                          1
                          down vote













                          emacs csv-nav mode will show the csv file and open single records in a text buffer for you to edit and save back to the original buffer






                          share|improve this answer

























                            up vote
                            1
                            down vote













                            emacs csv-nav mode will show the csv file and open single records in a text buffer for you to edit and save back to the original buffer






                            share|improve this answer























                              up vote
                              1
                              down vote










                              up vote
                              1
                              down vote









                              emacs csv-nav mode will show the csv file and open single records in a text buffer for you to edit and save back to the original buffer






                              share|improve this answer












                              emacs csv-nav mode will show the csv file and open single records in a text buffer for you to edit and save back to the original buffer







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 8 '14 at 12:20









                              Prach459

                              111




                              111






















                                  up vote
                                  1
                                  down vote













                                  I know this question is already quite old, but I want to add another tool, which I found very convenient:



                                  tabview (https://github.com/TabViewer/tabview)



                                  The header line of the csv file will always stay at the top and there are many more features.



                                  enter image description here






                                  share|improve this answer

























                                    up vote
                                    1
                                    down vote













                                    I know this question is already quite old, but I want to add another tool, which I found very convenient:



                                    tabview (https://github.com/TabViewer/tabview)



                                    The header line of the csv file will always stay at the top and there are many more features.



                                    enter image description here






                                    share|improve this answer























                                      up vote
                                      1
                                      down vote










                                      up vote
                                      1
                                      down vote









                                      I know this question is already quite old, but I want to add another tool, which I found very convenient:



                                      tabview (https://github.com/TabViewer/tabview)



                                      The header line of the csv file will always stay at the top and there are many more features.



                                      enter image description here






                                      share|improve this answer












                                      I know this question is already quite old, but I want to add another tool, which I found very convenient:



                                      tabview (https://github.com/TabViewer/tabview)



                                      The header line of the csv file will always stay at the top and there are many more features.



                                      enter image description here







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Dec 6 at 10:27









                                      TabeaKischka

                                      11816




                                      11816















                                          Popular posts from this blog

                                          How do I know what Microsoft account the skydrive app is syncing to?

                                          When does type information flow backwards in C++?

                                          Grease: Live!