Support #22849

Accessing the input file name from a SAM definition.

Added by Jason Stock 9 months ago. Updated 6 days ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I am using SAM as the input for a job, and am trying to access the input filename within the job. Is there a BASH environment variable for file names from the SAM getNextFile loop? I have searched the documentation for fife, tried to look in fife_wrap, and turned on debug, but have been unable to find one. This is using fife_launch directly (without POMS). The ultimate goal is to parse the input file name for the run and subrun numbers in bash so I can easily include them in my output file names for each job.

Example cfg:
Example run command:


#1 Updated by Marc Mengel 9 months ago

For the recent versions,(i.e v3_2_9 and any later) you should be able to use ${fname} for the file name and ${furi} for the uri it was fetched from. (in
case there is useful info in the file path for example)

Escaping the $ sufficiently is hard; so I'm working on providing a built-in
%(fname)s in fife_launch which will expand to like 15 backslashes and ${fname}.
(which is to say, it's in there but not really tested yet).


#2 Updated by Jason Stock 9 months ago

Thanks! Exactly what I was looking for.

#3 Updated by Marc Mengel 9 months ago

It's one of several good ideas I stole from the NOvA fork of

#4 Updated by Marc Mengel 7 months ago

  • Status changed from New to Resolved

#5 Updated by Marc Mengel 7 months ago

  • Target version set to v3_3

#6 Updated by Marc Mengel 6 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF