3 ms·
many 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 powerf
by dijit 11y ago
many 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.