python打开文件逐行读取文件命令并执行

python代码:
import os 

file = open("cc.txt")

for line in file:

  os.system(line)



ruby代码:
 file = File.open("ttt.txt")

    file.each_line do |line|

      %x(scp #{line.chomp} #{line.replace("/","")})

    end

猜你喜欢

转载自schooltop.iteye.com/blog/2324408
今日推荐