On Fri, 2004-08-06 at 17:57, [EMAIL PROTECTED] wrote: > How come the following script deletes itself? > > #!/bin/rm > # Self-deleting script.
The line at the top: #!/bin/rm tells the shell which program to run to interpret the script you've written. For example, a file test.pl beginning with the line: #!/usr/bin/perl could be run as ./test.pl (assuming test.pl is in the current directory), but the shell is actually calling '/usr/bin/perl test.pl'. You've chosen /bin/rm to "interpret" your script, which won't interpret it at all. It will run '/bin/rm file' when you execute it. This will simply remove it. Casey ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
