def list(dir, pattern): command = 'find "' + dir + '" -name "' + pattern + '"' return commands.run(command)
def list(dir, pattern, exclusions): command = 'grep -lr "\'' + pattern + '\'" ' + dir + ' --exclude ' + exclusions return commands.run(command)
def check(files): s = " ".join(files) command = 'for x in ' + s + '; do if [ -f $x ]; then echo $x; fi done' return commands.run(command)