From cat to grep to cp and dd and many many many other redundant tools that exist in the system.
…redundant with what? Sure, instead of grep
you can use sed -e g/re/p
: First came ed which can do the same but requires the whole file to be loaded into memory so grep was written as a way to search through files ergonomically and quickly. Quite a bit later came sed to do more complex operations on files in a streaming manner: Sed is for streaming editing, ed is for interactive editing, they happen to share a common vocabulary but really are made for different things. grep knows exactly one word from that vocabulary and applies it to multiple files in a single command, something that’s not really suitable for the editors.
Can’t think of anything that’s redundant with cp, unless we leave the terminal. dd and cat might have some overlap but only if you combine cat with shell redirection. I’ll freely admit that dd is a hell of a wart, though, it is so damn ancient it predates unix command line option conventions.
Today we have far too complex systems to just expect people to work by making a pipe with 5 tools lined up to achieve something a single click in menu can do.
No. The way it usually works is that an end-user makes a click and things get handled by five different tools, completely behind the scenes. Power-users then can come along and customise that stuff as they wish.
jj4211@lemmy.world 8 months ago
Well, “duplicate” functionality isn’t counter, but generally it’s not quite “duplicate” either.
cat doesn’t do much, and technically in most cases where people use cat, they can skip the use of cat. cat and grep aren’t at all redundant, but maybe you mean cat |grep , versus “grep file”, but really the first form is not a design intent, it’s that cat is a habit to “get content to screen” and “pipe to grep” is a habit to filter out whatever content was on screen.
cp and dd are not really the same. dd is meant to take specific blocks from one place and put them in a specific place in one other file. cp is about copying whole files only, and can do a bunch of files to one directory.
As to it being ‘obsolete’, well the thing is that UI design has been swinging back to “CLI-y” ways, because you only have so much real estate on screen for guided menu driven action, and a fairly open ended universe of things people want to do. When people use office, they usually just start typing what they want rather than trying to find it by navigating the ribbon.
Though the “one tool and do it well” usually doesn’t happen in GUI land (closest I can think is NextStep had some of it, and vestigial bits of that are possible in macos, though never used), but it’s still plenty valuable.