Only print contents if file wasn't empty, or EOF wasn't first thing received from stdin.
@@ -80,7 +80,9 @@ impl<'b> Controller<'b> {
input_file: InputFile<'a>,
) -> Result<()> {
printer.print_header(writer, input_file)?;
+ if !reader.first_line.is_empty() {
self.print_file_ranges(printer, writer, reader, &self.config.line_ranges)?;
+ }
printer.print_footer(writer)?;
Ok(())
