gpt4 book ai didi

AZure azcopy Linux - 如何将变量传递给 azcopy

转载 作者:行者123 更新时间:2023-12-03 06:12:33 30 4
gpt4 key购买 nike

美好的一天

我想将 $mm 的值传递给此 azcopy。但是,由于 azcopy 参数用双引号引起来,因此它不希望正确处理。

 $mm=04 ; start=`echo "START DATE: $(date)"` ; azcopy cp "https://reco.blob.core.windows.net/raw-voi-2022/2022-$mm/*?sv=2020-0RgUNH8A%3D" "https://storage.blob.core.windows.net/bin-voi-2022/2022-$mm?sv=2021-0HGICxvaLULI%3D"

结果:

Job 24fa36ea-8bda-cc4f-632a-07db4d922036 has started
Log file is located at: /log/azcopy/24fa36ea-8bda-cc4f-632a-07db4d922036.log

100.0 %, 0 Done, 0 Failed, 0 Pending, 0 Skipped, 0 Total,

Job 24fa36ea-8bda-cc4f-632a-07db4d922036 summary Elapsed Time (Minutes): 0.0333
Number of File Transfers: 0
Number of Folder Property Transfers: 0
Number of Symlink Transfers: 0
Total Number of Transfers: 0
Number of File Transfers Completed: 0
Number of Folder Transfers Completed: 0
Number of File Transfers Failed: 0
Number of Folder Transfers Failed: 0
Number of File Transfers Skipped: 0
Number of Folder Transfers Skipped: 0
TotalBytesTransferred: 0
Final Job Status: Completed

谢谢。

最佳答案

我总结了我们的讨论,并将上述评论作为答案发布。

由于您在 Linux 中运行上述 cmdlet,因此需要使用 mm=04 初始化变量,而不是使用 $mm=04

关于AZure azcopy Linux - 如何将变量传递给 azcopy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76602233/

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