Exemplo n.º 1
0
Arquivo: find.py Projeto: boltjs/bolt
def list(dir, pattern):
    command = 'find "' + dir + '" -name "' + pattern + '"'
    return commands.run(command)
Exemplo n.º 2
0
Arquivo: grep.py Projeto: boltjs/bolt
def list(dir, pattern, exclusions):
    command = 'grep -lr "\'' + pattern + '\'" ' + dir + ' --exclude ' + exclusions
    return commands.run(command)
Exemplo n.º 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)