Sponsored Content
Top Forums UNIX for Dummies Questions & Answers text drivers for .txt and .csv files ?? Post 18501 by LivinFree on Friday 29th of March 2002 12:47:26 AM
Old 03-29-2002
I may be way off, but you don't need a driver just to read a csv (tsv, *sv) file into data structures.
Use awk, sh, perl.... etc.
For example, each night we produce a very large comma-delimited file each night for importation into a legacy application.
This will check if the file is 120 columns wide. If not, it will identify which row produced the error, and if so, will give us the output of column 52 along with the record identifier, which we can use for reporting purposes:
Code:
BEGIN { FS = "," }
{
   if (NF != 120)
      printf("Bad: %s\n",$1)
   else
      printf("%s %s\n",$1, $52)
}

If it's OK, it's imported into a legacy database.

And I don't know where you are coming up with the information that MySql is derived from SyBase in any way... That would be like saying that Oracle was built on db2.
Please check your sources, as you may have been misinformed.

Like was said above in another post, we are afraid of (and do not understand the full feature-set of) any product that we are not familiar with. I suggest that if you're really going to use these tool, learn them fully before poo-pooing them.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

2. Shell Programming and Scripting

Sed or awk script to remove text / or perform calculations from large CSV files

I have a large CSV files (e.g. 2 million records) and am hoping to do one of two things. I have been trying to use awk and sed but am a newbie and can't figure out how to get it to work. Any help you could offer would be greatly appreciated - I'm stuck trying to remove the colon and wildcards in... (6 Replies)
Discussion started by: metronomadic
6 Replies

3. Shell Programming and Scripting

Combine Multiple text or csv files column-wise

Hi All I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below. What can i do to resolve this ? File 1 File... (15 Replies)
Discussion started by: venky_ibm
15 Replies

4. Shell Programming and Scripting

Comparing Strings in 2 .csv/txt files?

EDIT: My problems have been solved thanks to the help of bartus11 and pravin27 This code is just to help me learn. It serves no purpose other than that. Here's a sample csv that I'm working with - #listofpeeps.csv Jackie Chan,1954,M Chuck Norris,1930,M Bruce Lee,1940,M This code is... (13 Replies)
Discussion started by: chickeneaterguy
13 Replies

5. Shell Programming and Scripting

Parsing txt, xml files and preparing csv file

Hi, I need to parse text, xml files to get the statistic numbers and prepare summary csv file. What is the best way to parse these file and prepare csv file. Any idea you have , please? Regards, (2 Replies)
Discussion started by: LinuxLearner
2 Replies

6. UNIX for Dummies Questions & Answers

Need help combining txt files w/ multiple lines into csv single cell - also need data merge

:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux. I am working in Linux terminal. I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies

7. UNIX for Dummies Questions & Answers

How to create a .csv file from 2 different .txt files?

Hi, I need to create a .csv file from information that i have in two different tab delimited .txt file. I just want to select some of the columns of each .txt file and paste them into a .cvs file. My files look like: File 1 transcript_id Seq. Description Seq. Length ... (2 Replies)
Discussion started by: alisrpp
2 Replies

8. Windows & DOS: Issues & Discussions

2 Questions: replace text in txt file, add text to end of txt file

so... Lets assume I have a text file. The text file contains multiple "#" symbols. I want to replace all thos "#"s with a STRING using DOS/Batch I want to add a certain TEXT to the end of each line. How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies

9. Shell Programming and Scripting

Read multiple text files and copy data to csv

hi i need to extract lines from multiple files to a csv file. for example, i have these 3 files file1.txt date:29dec1980 caller:91245824255 called:8127766 file2.txt date:11apr2014 caller:9155584558 called:8115478 file3.txt date:25jun2015 caller:445225552 called:8117485 (30 Replies)
Discussion started by: lp.descamps
30 Replies

10. Shell Programming and Scripting

Search last column of INPUT.txt in TABLEs text and add correspond columns to INPUT.txt

Hi dears i use bash shell i have INPUT.txt like this number of columns different in one some row have 12 , some 11 columns see last column INPUT.txt CodeGender Age Grade Dialect Session Sentence Start End Length Phonemic Phonetic 63 M 27 BS/BA TEHRANI 3 4 298320 310050... (2 Replies)
Discussion started by: alii
2 Replies
DBIx::Class::Storage::DBI::ODBC::ACCESS(3)		User Contributed Perl Documentation		DBIx::Class::Storage::DBI::ODBC::ACCESS(3)

NAME
DBIx::Class::Storage::DBI::ODBC::ACCESS - Support specific to MS Access over ODBC DESCRIPTION
This class implements support specific to Microsoft Access over ODBC. It is a subclass of DBIx::Class::Storage::DBI::ODBC and DBIx::Class::Storage::DBI::ACCESS, see those classes for more information. It is loaded automatically by DBIx::Class::Storage::DBI::ODBC when it detects a MS Access back-end. This driver implements workarounds for "IMAGE" and "MEMO" columns, and DBIx::Class::InflateColumn::DateTime support for "DATETIME" columns. EXAMPLE DSN
dbi:ODBC:driver={Microsoft Access Driver (*.mdb, *.accdb)};dbq=C:Users kitoverDocumentsaccess_sample.accdb TEXT
/IMAGE/MEMO COLUMNS Avoid using "TEXT" columns as they will be truncated to 255 bytes. Some other drivers (like ADO) will automatically convert "TEXT" columns to "MEMO", but the ODBC driver does not. "IMAGE" columns work correctly, but the statements for inserting or updating an "IMAGE" column will not be cached, due to a bug in the Access ODBC driver. "MEMO" columns work correctly as well, but you must take care to set LongReadLen to "$max_memo_size * 2 + 1". This is done for you automatically if you pass LongReadLen in your connect_info; but if you set this attribute directly on the $dbh, keep this limitation in mind. AUTHOR
See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2014-01-05 DBIx::Class::Storage::DBI::ODBC::ACCESS(3)
All times are GMT -4. The time now is 09:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy