Definitions: valid safe file name: A valid file name is a file that contains no path components. Even if the provided file contains characters that would typically denote path components, it is to be treaded as a single filename. safe root: A safe root in this case is considered either: a) The current working directory of the running executable b) A list of valid directories provided in a read-only configuration file or a hard-coded list of directories inside the program itself c) A list of valid pairs consisting of a directory selector and target directory associated with said selector selector: A selector is a simple string that points to a valid directory entry. success code: A success code is implementation depended but for unices this is 0 in the shell. For C code or other programing languages, this can be either a boolean with the value 'true' or an integer with value 1, etc. Whatever the given language specifies as a success code should be returned. Mode of operations for standalone programs: 1) Process a valid [selector] and [filename] from STDIN 2) Compare the given selector with the list of selector and directory pairs. if a match is found, continue, otherwise abort 2) Create either a md5 or sha1 sum of the filename and compare it against the md5 or sha1 sum of all the files in the directory that matched the given [selector] 3) If the sums match up, read and print the file to STDOUT 4) Exit with [success code] .