Skip to content

Commit

Permalink
nl: -s separator versus 0
Browse files Browse the repository at this point in the history
* test1: no space between number and line (perl nl -s '' a.c)
* test2: 0 between number and line (perl nl -s0 a.c)
* Patch tested against GNU nl
  • Loading branch information
mknos committed Jun 12, 2024
1 parent f645ad5 commit 29fb358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/nl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ my $type_h = $options{h} || "n";
my $incr = $options{i};
my $format = $options{n};
my $single_page = $options{p};
my $sep = $options{s} || "\t";
my $sep = exists $options{'s'} ? $options{'s'} : "\t";
my $startnum = $options{v};
my $width = $options{w};
if (defined $format) {
Expand Down

0 comments on commit 29fb358

Please sign in to comment.