5 ms·
You have a valid point but its incomplete, allow me to explain you why we need projects like replace. You are right in telling that sewing a few utilities usin
by kamaal 14y ago
You have a valid point but its incomplete, allow me to explain you why we need projects like replace.
You are right in telling that sewing a few utilities using pipes can emulate 'replace'. But remember you are talking about learning those 'few' utilities first. Trust me unless you have practiced your way out of these thing with hundreds of hours with experience over years its humanly impossible to remember and use a tool like sed to its full capacity. The more utilities you add to your pipe chain the number of ways in which these utilities can be used more or less follows a exponential curve.
Now if some one comes along and gives you a version 1 of a tool that can simplify these things and give you simple way of doing things in a command instead of doing it with a ten pipe chain commands, he/she is ideally solving a problem of a great importance.
As some one who loves the Unix CLI, I have often wondered why people spend a whole day writing a java program what could have easily done with sed and awk in a line or two. But these days I understand why. Learning and using sed/awk to their full potential is a time consuming task. You not only have to learn them factually through a manual. You also need to study the problem cases for which they are appropriate. Then you need to go and put their solution patterns in your brain. Then you need to map all problem patterns with solution patterns. Then you need to learn all the arcane special cases. Generally this comes to a person over years practicing those utilities.
As a matter of fact Perl was invented because using C, with all these utilities was getting very difficult.
Now if somebody can give things like these. Which do many things out of the box, without you having to go through the pain of learning things and practicing over the years. They would have indeed given you a tool of great value.
In my experience even if some one fails working on something like this, by third or fourth version of the tool they generally come up with a thing of great value.
Think of this like Vim Vs Sublime Text 2. In case of vim there are ways of solving problems. In ST2 many of those solutions are automated and sometimes given to you out of the box.
- webreac 14y agoI have just publish a report on monday where I explain that the command line should be used instead of some small scripts that encapsulate for loops. The argument is that basic shell knowledge should be trained in order to not lose skill (or to improve). At my work, these skills are useful when facing unexpected urgent needs. Having a short script is a very poor benefit (simpler syntax and reduced key typing) for a big loss: - loss of knowledge - loss of understanding of what the script is doing - need to learn the name of the script which is not a reusable knowledge. Learning the basic usage of sed, awk, shell is an investment that is quickly rewarded. Learning all the intricacy of "replace" needs to know many javascript details and how they interact with shell escape sequences and your LOCALE configuration. I am sure it is less documented than the sed command.
- jsmeaton 14y agoThis is like saying you should learn C before using [some-lang] when all you want to do is cobble together a web page. Yes, it might be beneficial to some, but it's not absolutely required. Some people just don't live in the shell. We're taught to build upon useful building blocks to make useful things - why would you not abstract away the monotonous tasks?
- bruceboughton 14y agoAll I can say is I'm glad I don't work somewhere where someone writes a report on how I should get my work done at the most basic level.
- webreac 14y agoIt is a report on How and why I have done my work the way I did, What were the advantages and disadvantages, What could be done to improve the process. This kind of reports are useful for people doing similar activities.