Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

wc: unexpected stdout diff for multi-file output padding

Open
#252 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

Start by locating the rshell wc command entry point and any existing tests covering multi-file output. Reproduce the discrepancy with multi-file input and compare stdout with GNU wc, focusing on count-column width when filenames and a total line are printed. Done means the numeric counts, ordering, and byte-for-byte padding match GNU output.

Written by the indexing model from the issue text.

Description

QA

Summary

QA comparison found that rshell's wc output column padding differs from GNU wc for multi-file input. The numeric counts and file ordering match, but the stdout differs byte-for-byte because GNU pads count columns more widely.

Sanitized example

Command shape:

find <directory> -type f | sort | xargs wc -l

rshell stdout excerpt:

 19 <path>
 19 <path>
 19 <path>
 91 <path>
122 <path>
114 <path>
 69 <path>
 19 <path>
 27 <path>
 20 <path>
 27 <path>
 22 <path>
 27 <path>
 19 <path>
 27 <path>
 18 <path>
 27 <path>
 19 <path>
 27 <path>
 21 <path>
 27 <path>
 21 <path>
 27 <path>
 19 <path>

GNU/oracle stdout excerpt:

   19 <path>
   19 <path>
   19 <path>
   91 <path>
  122 <path>
  114 <path>
   69 <path>
   19 <path>
   27 <path>
   20 <path>
   27 <path>
   22 <path>
   27 <path>
   19 <path>
   27 <path>
   18 <path>
   27 <path>
   19 <path>
   27 <path>
   21 <path>
   27 <path>
   21 <path>
   27 <path>

Expected

wc should match GNU wc output formatting for multi-file counts, including the leading column padding used when filenames and a total line are printed.

Notes

This report is sanitized: it omits local artifact paths, run identifiers, and scenario-specific metadata. The finding was deduplicated across the QA run before filing.

Dominant language
Go
Stars
31
Forks
3
Avg merge
1d 4h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/rshell

All issues in DataDog/rshell

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.