If you don't mind specifying your reference file on the command line as a
shell script parameter, you can use $1 inside the shell script to pick its
name up and do things with it.
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org