Re: [opensuse] Re: add prompt to rm command
There is another distribution that does seem to alias 'rm -i'. As a first gnu/linux distribution (shall not be mentioned to avoid a distribution war), the command terminal automatically warns before removal. Then moving to opensuse, realised the danger ;). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/01/2012 04:31 PM, e-letter wrote:
There is another distribution that does seem to alias 'rm -i'. As a first gnu/linux distribution (shall not be mentioned to avoid a distribution war), the command terminal automatically warns before removal. Then moving to opensuse, realised the danger ;).
I remember some distros doing this for the root user, but I don't see a danger here. If someone is using a command line tool, the [s]he knows what [s]he is doing. And in case of complicated wildcard expressions for file globbing, there's always the possibility to call `echo CMD ...` first. Last but not least: you know what backups are for ... ;-) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Thu, 01 Nov 2012, Bernhard Voelker wrote:
On 11/01/2012 04:31 PM, e-letter wrote:
There is another distribution that does seem to alias 'rm -i'. As a first gnu/linux distribution (shall not be mentioned to avoid a distribution war), the command terminal automatically warns before removal. Then moving to opensuse, realised the danger ;).
I remember some distros doing this for the root user, but I don't see a danger here. If someone is using a command line tool, the [s]he knows what [s]he is doing. And in case of complicated wildcard expressions for file globbing, there's always the possibility to call `echo CMD ...` first.
That's a really BAD choice of quoting! By `` you execute the commmand you echo. `echo ls -l t.t*` -rw-r--r-- 1 dh dh 376 Jan 11 2012 t.tex -rw-r--r-- 1 dh dh 221 Feb 20 2012 t.txt -rw-r--r-- 1 dh dh 552 Jul 3 2008 t.txt~ HTH, -dnh -- An email message is a big bag of bytes. When you get a big bag of bytes your mailer is supposed to let you LOOK AT IT. When you get a big bag of bytes your mailer is NOT supposed to DO WHAT THE BYTES TELL IT TO DO. -- Mark W. Schumann -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 11/01/2012 11:20 PM, David Haller wrote:
On Thu, 01 Nov 2012, Bernhard Voelker wrote:
[...] And in case of complicated wildcard expressions for file globbing, there's always the possibility to call `echo CMD ...` first.
That's a really BAD choice of quoting! By `` you execute the commmand you echo.
`echo ls -l t.t*` -rw-r--r-- 1 dh dh 376 Jan 11 2012 t.tex -rw-r--r-- 1 dh dh 221 Feb 20 2012 t.txt -rw-r--r-- 1 dh dh 552 Jul 3 2008 t.txt~
Hi David, admitted, but as long as such a command is being embedded in a sentence, I don't see much difference to other quoting characters: neither "echo CMD ..." nor 'echo CMD ...' will do what you want if you copy/paste the command including the quoting characters into a terminal. Therefore, I thought that the backticks is just a way to separate the command from the normal text flow, and since the backticks are known for executing the command inside, I thought it would remind the reader that the string in between is something which can be executed (in opposite to e.g. a file name). Finally, I have choosen a general example with 'CMD' as command, so noone would ever want to execute that (well, maybe on Cygwin ;-). The only correct quoting would have been to show a complete example. What quoting style do you propose? Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Fri, 02 Nov 2012, Bernhard Voelker wrote:
On 11/01/2012 11:20 PM, David Haller wrote:
On Thu, 01 Nov 2012, Bernhard Voelker wrote:
[...] And in case of complicated wildcard expressions for file globbing, there's always the possibility to call `echo CMD ...` first.
That's a really BAD choice of quoting! By `` you execute the commmand you echo. [..] The only correct quoting would have been to show a complete example. What quoting style do you propose?
Either 'echo CMD ...' as inline-style, as it won't matter if the '' get copied or not, or set off as echo CMD ... or $ echo CMD ... or, mostly for script (-fragments) ==== echo CMD ... ==== (or something like that but with e.g. '----' instead of '===='). Just my 2 cents, -dnh -- I do not have enough Scotch in this house to attempt an XP install. -- Peter Corlett -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Bernhard Voelker
-
David Haller
-
e-letter