View Single Post
  #5   (View Single Post)  
Old 30th June 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

^ What he said

Consider this shell script:
Code:
rm -rf "/${root}"
Now, because of a error in your script or some other reason, ${root} isn't set. The shell will continue happily, but now it executes:
Code:
rm -rf "/"
Whoops!
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.

Last edited by Carpetsmoker; 30th June 2011 at 04:52 PM.
Reply With Quote