3 ms·
> Do one thing and do it well. People really like to parrot this statement. Nobody is going to make it do "more" than a scheduling tool. It's not going to beco
by feld 11y ago
> Do one thing and do it well.
People really like to parrot this statement. Nobody is going to make it do "more" than a scheduling tool. It's not going to become a volume manager or start steering your clock...
Why aren't you angry about these redundancies:
* sort's -u flag when there's uniq ?
* grep's ability to search recursively when there's find ?
* grep's existence when there's ed ?
* cron's existence when there's at ?
* cat's existence when there's < ?
We could play this game all day.
- dijit 11y agomany of those things dont actually do the same thing. at runs a scheduled job once and then terminates, cron runs scheduled jobs repeatedly. ed/sed are powerful languages that are used for 'changing' data, not searching it.. it _can_ be used to search but it's very heavy for the task. grep also searches content of files recursively, where as find does not, having find do it means forking the process and being very heavy also. cat and < are different in that one is a shell builtin and is used to.. concatonate files.. which the shell builtins do not do... ofc many people "use it wrong" but that's neither here nor there in this discussion. https://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat https://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat
- simoncion 11y ago/me puts on Devil's Advocate hat > at runs a scheduled job once and then terminates, cron runs scheduled jobs repeatedly. Make recurring scheduled jobs reschedule themselves as their last action. This makes your job scheduler do one thing and do it well. :P > [ed] _can_ be used to search but it's very heavy for the task. So? ed was around before grep. Grep is therefore redundant. > grep also searches content of files recursively, where as find does not. The point there was that find can recursively create a list of files for grep to search, passing them along to grep. This means that grep's -r switch is redundant. /me removes Devil's Advocate hat > cat and < are different... If I had more time today, I would figure out if one can abuse the hell out of shell redirection to replace cat. It sounds like a fun way to waste a half-hour.