Skip to content

Commit

Permalink
Merge pull request #192 from mknos/grep-fdir
Browse files Browse the repository at this point in the history
grep: directory argument to -f
  • Loading branch information
briandfoy committed Jul 7, 2023
2 parents 6e857b7 + 32f40e0 commit 6acaec6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/grep
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ sub parse_args {
my $no_re = $opt{F} || ($Me =~ /\bfgrep\b/);

if ($opt{f}) { # -f patfile
die("$Me: $opt{f}: is a directory\n") if (-d $opt{f});
open PATFILE, '<', $opt{f} or die qq($Me: Can't open '$opt{f}': $!);

# make sure each pattern in file is valid
Expand Down

0 comments on commit 6acaec6

Please sign in to comment.