gpt4 book ai didi

Linux-wget 命令

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:28:25 25 4
gpt4 key购买 nike

我需要快速帮助来自定义我的 命令 脚本:

wget 命令看起来像这样:

wget http://infamvn:8081/nexus/content/groups/LDM_REPO_LIN64/com/infa/com.infa. products.ldm.ingestion.server.scala/10.0.0.135.527-SNAPSHOT/com.infa.products.ldm.ingestion.server.scala-10.0.0.135.527-20150622.210643-1-sources.jar

我想在变量中添加 10.0.0.135.527,所以我创建了一个类似这样的脚本:

n = 10.0.0.135.527
wget http://infamvn:8081/nexus/content/groups/LDM_REPO_LIN64/com/infa/com.infa.products.ldm.ingestion.server.scala/"$n"-SNAPSHOT/com.infa.products.ldm.ingestion.server.scala-"$n"-20150622.210643-1-sources.jar

但这行不通,知道这里出了什么问题吗?

最佳答案

尝试创建一个字符串变量 n,没有前导空格(感谢 @011c):

n="10.0.0.135.527"
wget http://infamvn:8081/nexus/content/groups/LDM_REPO_LIN64/com/infa/com.infa.products.ldm.ingestion.server.scala/"$n"-SNAPSHOT/com.infa.products.ldm.ingestion.server.scala-"$n"-20150622.210643-1-sources.jar

关于Linux-wget 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30991610/

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