Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

read bucket object file using powershell or bash

I have a list of instances (file)in storage bucket.

I am planning to create a function which calls the vm id row by row from a storage bucket .

what is the suggested way, can we write function  in bash or powershell to do the same?

0 3 543
3 REPLIES 3

Here's a way to get started:  

 

 

for file_name in `cat file_list.txt`; do
   gcloud storage cp gs://myBucket/$file_name .
done

 

The file_list.txt would have one image file name per row.  

Hi how to read files from gcp bucket using bash script 

My post above is a bash script 🙂