Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I thought that awk without arguments is equivalent to awk {print} file.
But when I do:

awk '' file

Nothing is printed.


share|improve this question
Who said '' was nothing...? :p – John WH Smith Jul 15 '14 at 11:22
up vote 3 down vote accepted

Because in your case, awk evaluated a false condition, and no associated actions so it does nothing.

awk does default action print when a condition is true and no actions are specified,


awk 1 file
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.