Reply to post: Re: Very unclear

Oh SNAP! Old-school '80s Unix hack to smack OSX, iOS, Red Hat?

Bronek Kozicki

Re: Very unclear

rm "Important File.ows" "shellscript.sh" "My \"Expenses\".ods" "-rf"

When writing C (or C++) program parsing parameters like the above, you will find that the last parameter "-rf" was passed by shell to your program without surrounding quotes. Thus this gained nothing :(

Of course you might be advocating that quotes surrounding parameters should be passed to program (also when put explicitly by the user) but I'm not certain that this is good idea. For one, how do you pass a filename starting with quotes to your program and make it understand that these quotes are part of the filename, not a decoration?

It is up to program to decide what is filename and what is option.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon