Skip to content

Conversation

@flamxi
Copy link

@flamxi flamxi commented Oct 21, 2025

This PR contains:

  • Hotfix of the help message of the tool
  • Includes an enhancement to print the input in the scenario of one input only
  • Adapts the unit tests to the prior enhancements

Filename will be included in output even in the case of one file input,
previosuly that print was inlcuded only in the case of multiple input files
traditional 'wc' tool prints the filename in both scenarios
@jgarzik
Copy link
Contributor

jgarzik commented Oct 21, 2025

NAK - this is a regression

The utility should match BSD and Linux behavior, which this PR undoes: if the input is stdin and only stdin, then do not print a filename. Only print the numeric result.

This PR would likely break existing scripts.

@jgarzik jgarzik closed this Oct 21, 2025
@flamxi flamxi deleted the enhance-of-wc branch October 21, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants