Closed Mosney closed 4 years ago
curl
有提供对应的选项,取决于你的需求,有两种做法:
用 -J, --remote-header-name
使用原文件名
例 curl -LOJ https://glare.now.sh/pymumu/smartdns/^luci-app-smartdns.*\.ipk$
用 -o, --output <file>
指定一个文件名
例 curl -L -o smartdns.ipk https://glare.now.sh/pymumu/smartdns/^luci-app-smartdns.*\.ipk$
是的,目前在用-o
控制保存文件名,感谢回复。
例如:
curl -fLO https://glare.now.sh/pymumu/smartdns/^luci-app-smartdns.*\.ipk$
保存的文件名就是^luci-app-smartdns.*.ipk$
curl -O
指定的remote-name
被正则表达式取代了,不知有没有方法避免。