only check lines if there is a result of cmd
Merge pull request #1 from darktim/master

only check lines if there is a result of cmd