commit | 5ed3c33417d35be2bfc2336c2b29bf1f1bc8509e | [log] [tgz] |
---|---|---|
author | Daniel Mentz <danielmentz@google.com> | Mon Nov 07 14:26:30 2022 -0800 |
committer | Rob Landley <rob@landley.net> | Mon Nov 07 17:41:24 2022 -0600 |
tree | 4e4b1571d065331aa12d02bd15b98c096c934c30 | |
parent | 76369dd193304dc4103b068008f3dae56842e4ea [diff] |
Fix grep to not truncate last character of file provided by -f argument The command line argument -f allows a user to specify a file that lists multiple regular expressions (one per line) to match. It turned out that, if the file ended with a new line character (like most text files do), then the character just prior to that newline character got truncated. For example, if the file was just 4 bytes long and contained "abc\n", then the character "c" would be removed.