3 ms·
Super interesting. I had a brief look at "head" and "df" and the flows seem to be complete. The flow for "tr" is not completely right given that the second par
by Tepix 7y ago
Super interesting. I had a brief look at "head" and "df" and the flows seem to be complete.
The flow for "tr" is not completely right given that the second parameter ("string2") is optional with certain options.
The text for "yes" mentions how it fills a buffer with multiple copies of the string to achieve its very high performance. Nice!
- yodon 7y agoReminds me of a time at a large animation studio where I was working on performance issues with the in-house asset management system. The asset management tool was fully commandline based, no GUI. An artist showed me what was involved in committing their scene: launch the command, type yes, hit return, wait about 30 seconds, type yes, hit return, repeat. I piped yes to stdin and it ran for 47 hours. If you need a performance-optimized version of "yes" there are probably other aspects of your architecture you should look at first.
- masklinn 7y agoyes(1) takes a custom "expletive", so in the performance context it's usually used for flood filling in situations where e.g. /dev/zero or /dev/urandom are not appropriate sources for some reason.
- saagarjha 7y agoyes outputs newlines, though, which makes it somewhat annoying to use for flood filling in practice.