Skip to content

Latest commit

 

History

History
4 lines (4 loc) · 254 Bytes

file.md

File metadata and controls

4 lines (4 loc) · 254 Bytes

File

  • Empty: [[ ! -s FILE ]] && echo Empty
  • Empty of white spaces only: [[ ! $( awk NF FILE ) ]] && echo Empty or white spaces only
  • Duplicate lines: ! awk 'a[$0]++{exit 1}' FILE && echo Duplicate found (includes empty / white spaces lines)