Count number of records

A very common people might face:

Count the number of records they have in their csv, and to make it interesting, check it from shell of your server..

Since you are accessing your server through an ssh connection via shell, running spreadsheet programs wouldn’t be of any help.. 😛

Now, a CSV is created by separating the data in a record by commas (,) and putting each record in a new line. Thus you can see the number of records by simply counting the number of lines in your file.

A simple bash command for that is:

wc -l filename.csv

Not much to write in that command..

Explore posts in the same categories: Uncategorized

Tags: , ,

You can comment below, or link to this permanent URL from your own site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: