Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
For number fields, commas separate the fields. For text fields, usually the contents of the field is contained in double quotes. What is the source? Are you converting one file type to a csv file (a filter) or is this the output you want for your application?
You could take a spreadsheet, and export a table as a CSV file, and then examine it. There can be problems if your text field can contain a double quote or a comma. The double quotes are used in text fields because for fields like addresses, commas are common.
You could take a spreadsheet, and export a table as a CSV file, and then examine it. There can be problems if your text field can contain a double quote or a comma. The double quotes are used in text fields because for fields like addresses, commas are common.
Openoffice scalc (the spreadsheet) deals with that issue pretty well. You can indicate what your separator is (comma, tab, semicolon, hash, etc.) and what your field delimiter is (if any). That shouldn't be much of a problem then.
Cheers,
jdk
Err, you use write/file save/save as. If you are using some particular application, it is whatever that application uses to write files, but you have to tell the application that you want a csv file, which varies a bit depending on the application.
If you are using an application that doesn't support writing csv files, then that would be a problem, but you may still be able to do it, either going via an intermediate app that does write csv files, or writing a little bash/perl/python/sed/awk script that converts something that you can write (and understand) into what you want.
CSV starts simple but can get trickier, for example, if you have a quoted string with other quote marks in it. If you are familiar with a scripting language like Perl, I'd suggest you use a well established CPAN module to write the file. I imagine other tools like python also have prewritten (and preDEBUGGED) library tools.
Another approach is to use files where the fields are delimited by TAB characters. That's what I did when I used Microsoft Access. (I think Microsoft let you specify the delimiter in case fields of your file can contain tabs. Another thing to watch out for: some editors immediately convert tabs to the "appropriate number" of spaces, but you may be able to turn that "feature" off.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.