On Thu, Mar 16, 2017 at 5:16 PM, Carlos E. R.
On 2017-03-16 20:13, Brian K. White wrote:
On 3/16/2017 2:13 PM, Carlos E. R. wrote:
On 2017-03-16 18:04, David Haller wrote:
Hello,
*Gah* Don't you learn the absolute basics of the shell you use anymore?
Why in the world should rm act otherwise when you call it with the '-i' option? No matter if you typed the -i or if it is the result of globbing?
Well, no, I was not aware of this. And I have been using the Linux shell bash for almost two decades.
I thought, without thinking, that the command would differentiate between options and filenames automatically. No, it is not so, not in Linux. The shell expands the '*' and gets all options and filenames as just strings in the same command line. MsDos doesn't get this confusion, it is the app which has to do the expansion after it parses the command line.
Sorry, but shell expansion is basics. If you managed to go 20 years without knowing how the shell works, that doesn't mean it was secret hidden unfathomable knowledge. The fault is yours not the shells.
I know the parts of how the shell works that I have needed, and yes, I have read the manual more than once. And I wrote many scripts. I simply did not notice the implications of a file named "-c".
Carlos, Be especially sure not to create to files "-rf" and "/" I've never tried it, but I assume "rm *" in that folder could do "rm -rf /" And over the decades, I've had to use the -- feature a few times. I don't recall how I came to know it existed, but I learned why due to need. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org