Find count of rows in excel sheet in Unix

Hi,

Is there a way to find the count of number of rows of a.txt please? Where a.txt is as follows:

/usr/bin/uuencode /tmp/a.csv a.csv > /tmp/a.txt
#a.csv is a comma separated variable file

Cheers,
Girish.

wc -l < /tmp/a.txt

--ahamed

wc -l  /tmp/a.txt

The file a.txt is encoded due to the command uuencode.
Hence the count of a.csv does not match a.txt using the following:

wc -l a.txt
# the abouve count is not equal to the below
wc -l a.csv

I need to find the actual count of a.txt which should be equal to a.csv.
Please insert some random values in a.csv and check. For example:

cat > a.csv
aaaaaaa,aaaaaaaaa,aaaaaaaaaaaa,aaaaaaaaaaaa,aaaaaaaaaaaaa,aaaaaaaaaaaaa
bbbbbbbbbb,bbbbbbbbbbb,bbbbbbbbbbbb,bbbbbbbbbbbb,bbbbbbbbbb,bbbbbbbbb
cccccccccccccc,ccccccccccc,ccccccccccc,cccccccccccc,cccccccccccc,cccccccccc
ddddddddddddd,ddddddddddd,ddddddddd,ddddddddddddd,ddddddddd,ddddddddddd
CTRL+d

$ /usr/bin/uuencode /tmp/a.csv a.csv > /tmp/a.txt
$ wc -l a.csv a.txt
       4 a.csv
      10 a.txt
      14 total
$

I don't think that makes any sense!

--ahamed

Count of a.csv is 4 and count of a.txt should be 4 as both have 4 rows.

Is there any command or way so that I get the count of a.txt as 4, please?

wc -l will not work here for a.txt as it gives the count of number of lines and not the number of actual rows.

---------- Post updated at 11:22 AM ---------- Previous update was at 10:47 AM ----------

Can do it using uudecode :

uudecode -p b.txt | wc -l

Cheers,
www.

That is as good as counting the plane txt file isn't it?

--ahamed

User is trying to count rows in a spreadsheet file.
Probably need to 'save as' the spreadsheet file to a .csv file, and then the wc command will give # rows in the spreadsheet.
Otherwise, would need to use a function (there are some on the internet) that allows you to read (understand) the spreadsheet file.