58def find_file(pattern):
60 Bash inline command frequently used in multi-step tests
61 to pass the output of one step to the input of another
62 based on a name pattern rather than a fixed full file name
64 return '`find . -name \'{:s}\' | tail -n 1`'.format(pattern)
66def find_file_in_path(filename, path_env_var):
67 '''Find filename in search path given by environment variable'''
69 # same as AthenaCommon.unixtools.FindFile but don't want AthenaCommon dependency
70 for path in os.environ[path_env_var].split(os.pathsep):
71 f = os.path.join( path, filename )
72 if os.access(f, os.R_OK):