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