简体   繁体   中英

Gsutil multiple commands in a shell script is working on gitbash for windows but won’t run properly in the linux cli

I have thousands of gsutil commands in a shell script with the syntax “gsutil cp gs://name of bucket/from-path to-path”

When I execute this script in my windows local using a gitbash it works fine. But when I am running this script in a Linux, it shows that the files are getting copied but when I look in the folder it is empty. Please help me.

Files should get saved in the destination.

The actual commands are: gsutil cp gs://mycompany/archive/data/raw/integration/THY/2022/12/19/TKT_20221217.zip /home/ds102e/workspace/mft/

gsutil cp gs://mycompany/archive/data/raw/integration/SLK/2022/12/19/SQ9V_20221608.zip /home/ds102e/workspace/mft/

Is it possible you're on a Linux environment where gsutil is defined as an alias that runs gsutil in an isolated filesystem (eg within a docker container)? You can verify this by running type gsutil from your linux shell. As an example, see this post .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM