-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore -R flag #9
Comments
Thanks for your bug report! The first version of rpl was written in 1998, as far as I can tell, though I'm sure similar utilities have existed for much longer; indeed, it's a mystery to me why there isn't a standard Unix tool for this task! I wrote a similar program, though much less capable, starting from 2006. Note that by default rpl 1.8 and later does use regular expressions, though you can use the There's nothing esoteric about getting find PATH [PREDICATES] -print0 | xargs -0 [COMMAND] It's a shame in one sense that this is not the default behaviour. But on the other, if you just do: find . | xargs rpl OLD NEW this will work for all filenames that don't contain a newline. I recently discovered that you don't need find . -exec rpl OLD NEW {} + It turns out that However, rpl OLD NEW '**/*' I will not be restoring |
Why are you forking rpl so that it is no longer comparable with the BSD distribution rpl and the rpl distributed by all other linux distributions? This is clearly a standards and compatibility problem. Why are you biased against maintaining the standard behavior of this command, as documented in all linux/unix man pages for decades? How does removing functionality improve linux? How does removing a documented feature in the man page, help the linux community? Why were you given maintainer status by debian? Also
Which one of these two commands is easier to read and more clear? This is clearly a usability issue. The only purpose of rpl is for finding and replacing text, for simple cases that do not require regex. Should the -R flag be removed from grep? Shall I ask the grep maintainer if he agrees with your argument? Should the -R flag be removed from rm because its "too dangerous"? Also, you can do
and it is cleaner because you do not have to use xargs. But again, your solution is highly discriminatory and If you remove the -R command line flag, you are going to be driving people to use perl and awks for operations that do not require it. |
I would suggest you maintain the standard behavior of rpl, so that it matches BSD and all other linux distributions. For comparability and standardization between linux distributions. And also for improved readability.
As one of these is clearly cleaner and more readable than the other.
Then make a branch of rpl called "rpl-lite" with the features you do not like removed. And see if your neutered and featureless version of rpl becomes wildly popular. And maybe have "grep-lite" with -R removed. And "rm-safe" with -R removed for safety. And so on and we can gradually remove the -R flag from the most popular linux command line utilities to drive people into using perl, xargs and ack and replacing simple one line commands with complex shell scripting. |
I haven't forked
My suggested solutions (in particular, using It is indeed simpler to combine Unix tools (as the designers of Unix intended), than to keep adding new options to programs. |
rpl -R is a standard unix/linux command that has been in use for forty years. And it is the best way to find and replace strings without using regular expressions.
And handles files with spaces in the name unlike xargs, which requires esoteric command line arguments to work for all file names and escaped characters.
The -R flag should only be removed if you hate linux and want it to die.
The text was updated successfully, but these errors were encountered: