I would like to make a rowcount file and subtract it from it. I know how to do the first part of getting a string with this function:
zcat filename$today.csv.gz | wc -l
But how can I subtract one of this value to account for the headers and store it in a variable? I tried
$(( zcat filename$today.csv.gz | wc -l - 1 ))
but it does not work.
Should I save the first output of the function as a variable first? Is this a recommended practice?
source share