Computing.Net > Forums > Unix > Script to Read a .CSV file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Script to Read a .CSV file

Reply to Message Icon

Name: Marupilla
Date: April 19, 2007 at 17:52:12 Pacific
OS: UNIX
CPU/Ram: 512
Comment:

I am looking for a simple script for reading the contents of a file (.CSV) for a Specific String and if it finds, it shuld rename the File accordingly.

2. The script shuld be able to get the number of new line or record count on the .CSV file

Thanks
Marupilla



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: April 21, 2007 at 19:59:02 Pacific
Reply:

what have you tried?
if its just looking for a specific string, you can use the normal tools like grep,sed,awk etc. to get line count, you can use wc -l


0

Response Number 2
Name: thepubba1
Date: April 23, 2007 at 19:18:46 Pacific
Reply:

A couple of weeks ago, I posted a script to compare the contents of 2 files and to print out the line number of any entry that was not in the second file. Using that logic, you should be able to develop a script to do what you want. Take a look at the script, modify it, and if you can't get something to work, post what you've created and the people on this forum will help you finish it.

http://www.computing.net/unix/wwwbo...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Script to Read a .CSV file

Shell script to read a file and pro www.computing.net/answers/unix/shell-script-to-read-a-file-and-pro/4304.html

Script to extract a word from file www.computing.net/answers/unix/script-to-extract-a-word-from-file/8081.html

Script to read from 2 files www.computing.net/answers/unix/script-to-read-from-2-files/8490.html