Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what: -s flag prints out of order #753

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/what
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub printWhat
{
next unless $line =~ m/\@\(#\)/;

if ((! $stop_flag) && ($line =~ /\0/)) ## there may be more than 1 in here
if ($line =~ m/\0/) ## there may be more than 1 in here
{
my @F = split(/\0/, $line);
my @match = grep { m/\@\(#\)/ } @F;
Expand All @@ -49,6 +49,7 @@ sub printWhat
$f =~ s|[">\0\\].*||; ##BSD spec says print to 1st " > \ or null
chomp $f;
print " $f\n";
return if $stop_flag;
}
}
else
Expand All @@ -57,8 +58,8 @@ sub printWhat
$line =~ s|[">\0\\].*||; ##BSD spec says print to 1st " > \ or null
chomp $line;
print " $line\n";
return if $stop_flag;
}
last if $stop_flag;
}
}

Expand Down
Loading