python打开文件逐行读取文件命令并执行
来源:动视网
责编:小采
时间:2020-11-27 14:17:11
python打开文件逐行读取文件命令并执行
python打开文件逐行读取文件命令并执行:import os file = open("cc.txt") for line in file: os.system(line)file = File.open("ttt.txt") file.each_line do |line| %x(scp #{line.chomp} #{line.replace("/","")}) end
导读python打开文件逐行读取文件命令并执行:import os file = open("cc.txt") for line in file: os.system(line)file = File.open("ttt.txt") file.each_line do |line| %x(scp #{line.chomp} #{line.replace("/","")}) end

import os
file = open("cc.txt")
for line in file:
os.system(line)file = File.open("ttt.txt")
file.each_line do |line|
%x(scp #{line.chomp} #{line.replace("/","")})
end
python打开文件逐行读取文件命令并执行
python打开文件逐行读取文件命令并执行:import os file = open("cc.txt") for line in file: os.system(line)file = File.open("ttt.txt") file.each_line do |line| %x(scp #{line.chomp} #{line.replace("/","")}) end