Comments (5)
So you want toybox's "count -l" to have an -L 8123748 variant so it knows how much data to expect and can do a progress bar and percentage complete?
As for "prior art", one of my first interactions with busybox back in the day was submitting my little "count" toy to them I'd been using since the 90's http://lists.busybox.net/pipermail/busybox/2003-October/043590.html and the immediate suggestion was of course to add a progress bar ala http://lists.busybox.net/pipermail/busybox/2003-October/043613.html and then there was bikeshedding on the list and the IRC channel and a fw weeks later the concept went in as https://git.busybox.net/busybox/commit/?id=e9080c9f4170 and then there was more bikeshedding I largely stayed out of because I'd been happy with "count"...
from toybox.
that is why i did not use the word "request" but rather "suggestion".
and i have to confess that i totally missed "count".
from toybox.
So you want toybox's "count -l" to have an -L 8123748 variant so it knows how much data to expect and can do a progress bar and percentage complete?
lets skip the discussion about a (graphical) progress meter a bit.
i have looked at count -l
and it is a wonderful headstart i did not notice.
given that, a -L <expected-total>
would be nice to show a "percentage complete".
looking at wc
... would it make sense to have an option to count lines (\n
) instead ?
i have a number of use cases where a script reads line-wise from a file, calculating and showing progress.
from toybox.
You mean give count a line counting option? I could make -L do line counting and -p do progress bar, sure. Neither is hard, it's just... you listed 33 options for "pv" above and I'd like to know where the edges of the problem space are before extending much further. (Looks like pv uses -s for estimated size, might as well match that.)
Let's see...
-p and maybe -eI are implied by -s, -trab is default, -l you just requested and I guess -0 goes with that.
But -TA are silly, I'm not doing -F, -nwDiBC are micromanaging, what is -q FOR (don't put it in the pipeline then, cat exists), -wH have environment variables that already do that, -f implies that we care whether stderr is a terminal which is not currently the case, -E is similarly out of scope, -c is toybox policy, -RPd are just off in la-la land, and -hV have --long versions as part of default toybox plumbing so aren't an individual command's job.
You could make an argument for adding -LS (which would explain -q) but that's not really this command's job? Ratelimiting is usually bidirectional, so it's more a netcat -f thing? Hmmm. I suppose you could make the case that we've got the plumbing so it's cheap for us to do...
So maybe -sl0LSq options. And maybe test that "zcat blah | COLUMNS=47 count" works right, although defaulting to 80 seems pretty reasonable too...
P.S. I usually try to have this kind of discussion on the mailing list. Microsoft github will eventually go the way of all web services and this history will be lost, with no obvious standard export format to migrate the archive elsewhere.
from toybox.
i will subscribe
from toybox.
Related Issues (20)
- Request diff -I/--ignore-matching-lines
- [Documentation] Differences to busybox? HOT 3
- [Feature request] Could a static-option be added to the menu interface? HOT 5
- [Documentation / Question] Can toybox be combined with e. g. mruby? HOT 9
- building a rootfs without a kernel HOT 10
- Most scripts use /bin/bash, which not all systems have. Use /usr/bin/env instead? HOT 11
- [Q] Can `bash` compatibility in toysh be turned off during build time and during run time? HOT 2
- building 0.8.11 with ssl and tls is broken HOT 15
- When running shell scripts, the process coredump.
- POSIX deviation: test arithmetic operands must support decimal only HOT 12
- find -size <number-without-suffix> not POSIX HOT 7
- Can you include oksh? HOT 1
- On incremental builds' reproducibility HOT 1
- ASAN failures in various file processing commands HOT 2
- [FR] envsubst HOT 4
- getty: does not display issue HOT 1
- command unshare broken HOT 1
- tar honor umask test fails on Android HOT 4
- Building Toybox for J2 Turtleboard fails since 650ff11a HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toybox.