[sh] fix possible empty line errors