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