Skip to content

tail: fix bug in rewriting argv - #1041

Merged
briandfoy merged 1 commit into
briandfoy:masterfrom
mknos:tail-n-202606
Jun 7, 2026
Merged

tail: fix bug in rewriting argv#1041
briandfoy merged 1 commit into
briandfoy:masterfrom
mknos:tail-n-202606

Conversation

@mknos

@mknos mknos commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Function new_argv() handles translation of bare [-+]x option. This failed to identify if the pattern appeared immediately after "-n". This was found when testing against the GNU version.

Tests:

  • perl tail -n 2 tail # last 2 lines
  • perl tail -n -2 tail # last 2 lines
  • perl tail -n +2 tail # show line 2 and all subsequent lines

Function new_argv() handles translation of bare [-+]x option. This failed to identify if the pattern appeared immediately after "-n". This was found when testing against the GNU version.

Tests:
* perl tail -n 2 tail # last 2 lines
* perl tail -n -2 tail # last 2 lines
* perl tail -n +2 tail # show line 2 and all subsequent lines
@mknos
mknos temporarily deployed to housekeeping June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@mknos
mknos temporarily deployed to automated_testing June 7, 2026 13:39 — with GitHub Actions Inactive
@github-actions github-actions Bot added Priority: low get to this whenever Status: needs verification issue needs to be verified Type: bug an existing feature does not work Type: enhancement improve a feature that already exists Program: tail The tail program and removed Type: bug an existing feature does not work Status: needs verification issue needs to be verified labels Jun 7, 2026
@briandfoy briandfoy added Type: bug an existing feature does not work and removed Type: enhancement improve a feature that already exists labels Jun 7, 2026
@briandfoy
briandfoy merged commit 2965680 into briandfoy:master Jun 7, 2026
23 of 24 checks passed
@github-actions github-actions Bot added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jun 7, 2026
@briandfoy

Copy link
Copy Markdown
Owner

changes: recognize -\d after a -n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Program: tail The tail program Status: accepted The fix is accepted Type: bug an existing feature does not work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants