I had a requirement to check if data exists after headers (typically row 2 & so on) in csv file.
please help how we can check through shellscript in linux.
Thank you !!
I had a requirement to check if data exists after headers (typically row 2 & so on) in csv file.
please help how we can check through shellscript in linux.
Thank you !!
wc -l <file
awk 'NR>1{exit}END{exit NR!=1}' file
If header size is known and constant
[ $(stat -c%s file) -eq $headsize ]