Skip to content

Bash truncation line count off by 1 #4818

@richardgill

Description

@richardgill
pi --no-extensions 'Use the bash tool exactly once: for i in $(seq 1 4000); do printf '\''line-%04d\n'\'' "$i"; done'

Shows 4001 lines:

...
[Showing lines 2002-4001 of 4001. Full output: /tmp/pi-bash-9db6502f95de3257.log]

But the command only omits 4000 lines:

for i in $(seq 1 4000); do printf 'line-%04d\n' "$i"; done | tee /tmp/pi-lines.txt | wc -l
=> 4000

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions