在Bash脚本中,我想将一行分成几部分并将它们存储在一个数组中.
这条线:
Paris, France, Europe
Run Code Online (Sandbox Code Playgroud)
我想将它们放在这样的数组中:
array[0] = Paris
array[1] = France
array[2] = Europe
Run Code Online (Sandbox Code Playgroud)
我想用简单的代码,命令的速度无关紧要.我该怎么做?
我试过了两个s3cmd:
$ s3cmd -r -f -v del s3://my-versioned-bucket/
Run Code Online (Sandbox Code Playgroud)
和AWS CLI:
$ aws s3 rm s3://my-versioned-bucket/ --recursive
Run Code Online (Sandbox Code Playgroud)
但是这两个命令都只是DELETE向S3 添加标记.删除存储桶的命令也不起作用(来自AWS CLI):
$ aws s3 rb s3://my-versioned-bucket/ --force
Cleaning up. Please wait...
Completed 1 part(s) with ... file(s) remaining
remove_bucket failed: s3://my-versioned-bucket/ A client error (BucketNotEmpty) occurred when calling the DeleteBucket operation: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
Run Code Online (Sandbox Code Playgroud)
好吧怎么办?他们的文档中没有关于此的信息.S3Cmd说它是一个"全功能"的S3命令行工具,但它没有引用除自己以外的版本.有没有办法在不使用网络界面的情况下做到这一点,这将永远需要我保持我的笔记本电脑?
command-line-interface amazon-s3 amazon-web-services s3cmd aws-cli