我想在Python脚本中执行以下操作: 更多20151010|ABC.txt | grep QST>;20151010\ u ABC.txt.QST
这类文件的数量(将近1000个文件)
那么
在脚本中打开VIM编辑器,按需传递*.txt或*.QST或NONE文件,如上所述
有什么想法吗? 谢谢你
样品:
import subprocess
more = subprocess.Popen(['more', '20151010_AlterAeon.txt.prsd'], stdout=subprocess.PIPE,)
grep = subprocess.Popen(['grep', 'LVL'], stdin=more.stdout, stdout=subprocess.PIPE,)
feed = subprocess.Popen(['>', '20151010_AlterAeon.txt.prsd.LVL'], stdin=grep.stdout, stdout=subprocess.PIPE,)
end_of_pipe = feed.stdout
#print "Files:", end_of_pipe
for line in end_of_pipe:
print line.strip()
我的问题主要基于以下几点:
相关问题 更多 >
编程相关推荐