diff --git a/README.md b/README.md index 1ad09e5c1..603479145 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ Click [here](https://docs.rs/file-format/latest/file_format/#reader-features) fo The `cat`, `headers`, `sqlp` & `to` commands have extended input support (🗄️). If the input is `-` or empty, the command will try to use stdin as input. If it's not, it will check if its a directory, and if so, add all the files in the directory as input files. -If its a file, it will first check if it has an `.infile-list` extension. If it does, it will load the text file and parse each line as an input file path. This is a much faster and convenient way to process a large number of input files, without having to pass them all as separate command-line arguments. Further, the file paths can be anywhere in the file system, even on separate volumes. If an input file path is not fully qualified, it will be treated as relative to the current working directory. +If its a file, it will first check if it has an `.infile-list` extension. If it does, it will load the text file and parse each line as an input file path. This is a much faster and convenient way to process a large number of input files, without having to pass them all as separate command-line arguments. Further, the file paths can be anywhere in the file system, even on separate volumes. If an input file path is not fully qualified, it will be treated as relative to the current working directory. Empty lines and lines starting with `#` are ignored. For both directory and `.infile-list` input, snappy compressed files with a `.sz` extension will be automatically decompressed. diff --git a/src/util.rs b/src/util.rs index f152bb981..61e02fc41 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1499,6 +1499,7 @@ pub fn process_input( input_file.read_to_string(&mut input_file_contents)?; input_file_contents .lines() + .filter(|line| !line.is_empty() && !line.starts_with('#')) .map(PathBuf::from) .collect::>() } else {