gpt4 book ai didi

linux - 来自 matlab 脚本的 wget - 卡住的线程

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:56:18 24 4
gpt4 key购买 nike

我需要从远程服务器获取列表中指定的一组文件。我使用了一个 Matlab 脚本(在 Centos6 机器上):

for k=1:length(u_list)
o_name = fullfile(outFolder, names{k});
i_name = u_list{k}.url;
[status, result] = unix(['wget -O ' o_name ' ' i_name]);
end

这不是很好用。我遇到了很多 wget 进程卡住

ps aux |grep wget

显示很多 wget 实例卡住了,一些文件没有通过。在我看来,问题在于 matlab 没有等待“系统”调用返回。有什么建议吗?

编辑:url 有一个 excape 字符“&”。正在做: unix(['wget -O 'o_name' --timeout=100 "'i_name'"']);

成功了。

最佳答案

url 有一个 excape 字符“&”。正在做:

unix(['wget -O ' o_name ' --timeout=100 "' i_name '"']);

成功了。

关于linux - 来自 matlab 脚本的 wget - 卡住的线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25761020/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com