← All tips

Bash: check a file is non-empty

bashbasics

-s tests existence and size > 0.

if [[ -s dist/index.html ]]; then echo ok; fi