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


LinkBack URL
About LinkBacks





Reply With Quote

Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum