Need to find lines where the length is less than 50 characters

Hi,
I have a big file say abc.csv. And in that file, I need to find lines whose length is less than 50 characters. How can it be achieved? Thanks in advance.

Thanks

awk 'NF<50' FS= infile
1 Like
awk 'length<50' infile

Thanks so much for ur help guys. Also, I wanna print the line numbers of those lines too? How shud i achieve that?

awk 'length<50{print NR,$0}' infile
1 Like