anon
anon

Reputation:

Bash: awk returning space after result

The command awk 'END{print NR}' file.log returns an integer, but with a space after it? How would I modify that command so there is no space returned after the result?

awk 'END{print NR}' file.log fetches the length of file.log.

Upvotes: 0

Views: 59

Answers (1)

imm
imm

Reputation: 5919

Try using printf instead:

awk 'END{printf NR}' file.log

Upvotes: 2

Related Questions