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