Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Command !

Status
Not open for further replies.

Rvir

Programmer
May 16, 2007
18
US
I've source file with 55907987 records .Iam writing it to a flat file. But when i count the number of records in the target like
$ gunzip -c filename |wc -l i get 55908012 records .Iam using a ETL tool to write in to a flat file.In the ETL process iam doing nothing other than extracting and writing it down in the flat file.Iam wondering if iam doing somethin incorrect on unix command line ???
 
No, your command looks fine.

Are you sure the output file doesn't contain some kind of header or footer that would account for the 25 extra lines?

Annihilannic.
 
Are there blanks lines in the file?

Try

gunzip -c filename | grep -v ^$ | wc -l



Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top