Hacker News new | ask | show | jobs
by pxeger1 1533 days ago
> For example, if I wanted to delete all empty files in a line, instead of remembering the exact incantation of sed to accomplish this, I could search "delete empty files".

(I'm assuming you meant "delete all empty lines in a file", since "delete all empty files in a line" doesn't make sense)

You don't need "the exact incantation of sed"; it can be done in 6 bytes: `grep .` if you know a bit of basic coreutils-fu. And if you want to do it with sed, which also allows you to do it in-place, it's not an "incantation" either. `sed -i /^$/d`. I didn't know that command ahead of time, I just worked it out using my problem solving skills and basic knowledge of sed. If you think it's an unintelligible incantation that you have to remember and can't reconstruct yourself, then you're not much of a developer.

Why would a developer want to search for "delete empty lines" in their terminal? If you don't know how to do it, you'd Google it and copy-paste from StackOverflow. If you do know how to do it, you'd just do it without needing to search for anything. It's not a complicated task.

And if it is a more complicated or at least a less general task, then a developer is gonna be able to write a program to do it.

Maybe your point is that someone else has already done that, but in which case, again, there's Google, or company documentation, or you can ask your colleague, or look in the `project/tools/` for the name of the script that does it already.

I just cannot see the purpose of this.