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

uniq: one input file #819

Merged
merged 2 commits into from
Nov 18, 2024
Merged

uniq: one input file #819

merged 2 commits into from
Nov 18, 2024

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Nov 18, 2024

  • Standards document explains uniq has two optional file arguments, input and output [1]
  • GNU and BSD versions follow this; do the same and stop treating subsequent file arguments as extra input files
  • test1: printf "a\na\nb\nc\nc\n" | perl uniq ---> implicit stdin and stdout
  • test2: perl uniq a.c ---> read a.c, write to stdout
  • test3: perl uniq a.c b.c ---> read a.b, write to b.c
  • test4: perl uniq A B C ---> invalid, too many args
  1. https://pubs.opengroup.org/onlinepubs/009696799/utilities/uniq.html

* Standards document explains uniq has two optional file arguments, input and output
* GNU and BSD versions follow this; do the same and stop treating subsequent file arguments as extra input files
* test1: printf "a\na\nb\nc\nc\n" | perl uniq ---> implicit stdin and stdout
* test2: perl uniq a.c ---> read a.c, write to stdout
* test3: perl uniq a.c b.c ---> read a.b, write to b.c
* test4: perl uniq A B C ---> invalid, too many args
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: uniq The uniq program labels Nov 18, 2024
@coveralls
Copy link

coveralls commented Nov 18, 2024

Pull Request Test Coverage Report for Build 11886238756

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 73.805%

Totals Coverage Status
Change from base Build 11878780124: 0.0%
Covered Lines: 355
Relevant Lines: 481

💛 - Coveralls

@briandfoy briandfoy added Type: compatability make it work like GNU or BSD and removed Type: enhancement improve a feature that already exists labels Nov 18, 2024
@briandfoy briandfoy merged commit f9f8b9f into briandfoy:master Nov 18, 2024
22 checks passed
@briandfoy
Copy link
Owner

changes: arguments are now exactly one input file and optionally one output file

@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Nov 18, 2024
@briandfoy briandfoy self-assigned this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: uniq The uniq program Status: accepted The fix is accepted Type: compatability make it work like GNU or BSD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants