Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 2
    But a single echo invocation may do more than one write(2) call and you have no control over that. With strace -fe write zsh -c "echo '${(l:10000:)}'" > /dev/null on Debian, I see two writes, one of 8192 bytes, one of 1809. Same with bash, probably down to stdio. Commented May 27, 2020 at 7:05
  • @StéphaneChazelas Interesting. Nonetheless: When I was searching for that lower limit I assumed it might be as low as 512 bytes. And even that would probably be more than enough for this task. Commented May 27, 2020 at 8:10