linecnt

Count the number of lines in a file and return the value as an integer. If the input file does not exist then "0" is returned.

 

% linecnt --help 
% linecnt filename 
Usage: linecnt list.all 
arg1 - file to be counted  

Example: 
% ls
list.all  list.dates  S/

% cat list.all
/home/sco/HET_work/acm_nights/20180116/acm/20180116T032449.0_acm_sci.fits
/home/sco/HET_work/acm_nights/20180116/acm/20180116T032458.0_acm_sci.fits
/home/sco/HET_work/acm_nights/20180116/acm/20180116T032506.9_acm_sci.fits

% linecnt list.all
 3

% linecnt boodle
 0




Back to SCO CODES page