![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to read record by record from a file in unix | raoscb | UNIX for Dummies Questions & Answers | 1 | 05-16-2008 07:30 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | Shell Programming and Scripting | 2 | 12-28-2007 10:02 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | UNIX for Advanced & Expert Users | 1 | 12-28-2007 10:00 AM |
| splitting a record and adding a record to a file | rsolap | Shell Programming and Scripting | 1 | 08-13-2007 02:58 PM |
| How to count the record count in an EBCDIC file. | oracle8 | UNIX for Dummies Questions & Answers | 1 | 07-26-2006 08:22 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to get a file name & record count of csv file
HI ,
I am new to shell scripting , I have a requirement that I send a file for data quality ( original.csv) & i will be getting 4 files daily into a particular directory in return with cleansed data . the files may be clean.csv, unclean.csv , interrim.csv. So now my requirement is to read the file name & record count of each file ,put the file name & record count into table(2 columns) compare the no of records(record count) in the sent file to the total record count all incoming files. Can any one help me out to how to get the file name & record count from CSV file . Thanks , SIRI |
|
||||
|
hi Joe,
yes , i have to read all the return files(4) ,the name & record count and put it into a table with filename, record count as columns . and have to cross check the total count of all return files and compare with the record count of the file . basically i want to insert the names of files > ls -l *.csv number of lines > wc -l *.csv into the table columns example: out file : ABCD 100 INFILES: infile1 : ABCD1 40 infile2 : ABCD2 30 infile3 : ABCD3 10 infile4 : ABCD4 20 i have to do a record check after inserting into a table for the ABCD file with Total count(ABCD1+ABCD2+ABCD3+ABCD4) if the count matches i have to take the files for further process , if the count mismatch i have to reject the batch. Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|