【发布时间】:2018-12-19 23:12:36
【问题描述】:
如何用pythonsubprocess调用LC_ALL=C sort -k1 file -o file?
当我尝试时:
subprocess.check_call(["LC_ALL=C sort -k1 {} -o {}".format(file,file)])
出现以下错误:
FileNotFoundError: [Errno 2] No such file or directory: 'LC_ALL=C sort -k1 file.txt -o file.txt'
【问题讨论】:
标签: python sorting subprocess