|
Help on counting number of bytes in a field
Hi,
I have a file that has 300 records with a load of fields. two of them are:
field_1 has between 8-9 bytes i.e. 012345678, 0123456789
field_2 has 10 bytes i.e. 01234567890
I want to be able to echo out the total of each of these fields i.e.
200 (have 8 - 9 bytes)
100 (have 10 bytes)
not sure how to do this, I have tried wc -l :
RR="wc -l customer directory/file in.dat"
the file in .dat has a space in the file name? not sure if it makes a difference?
I cannot get this to work?
any help would be appreceiated.
|