azurecat is a CLI tool to cat the microsoft azure blob storage.
Java 6 or higher
-
First, you must prepare your Connection String for your storage account. The format is
DefaultEndpointsProtocol=[http|https];AccountName=myAccountName;AccountKey=myAccountKey
-
Download from release.
-
Run the command,
azurecat -c <connection-string> http://<account-name>.blob.core.windows.net/<container-name>/<blob-path>
You can put your connection strings at ~/.azure/storagekeys
line by line
Here is the exmaple.
DefaultEndpointsProtocol=https;AccountName= myAccountName1;AccountKey=myAccountKey1
DefaultEndpointsProtocol=https;AccountName= myAccountName2;AccountKey=myAccountKey2
then, you can print the resource directly without connection string specified.
azurecat https://<account-name>.blob.core.windows.net/<container-name>/<blob-path>
-
Print a resource
azurecat https://<account-name>.blob.core.windows.net/<container-name>/<blob-path>
-
Concatenate and print the resources with prefix
azurecat --prefix https://<account-name>.blob.core.windows.net/<container-name>/<blob-prefix>
-
Concatenate and print the resources with prefix and the resource should match the postfix
azurecat --prefix --postfix csv https://<account-name>.blob.core.windows.net/<container-name>/<blob-prefix>
-
Decode the resource by gzip compression format.
azurecat -z --prefix --postfix gz https://<account-name>.blob.core.windows.net/<container-name>/<blob-prefix>
The full help for azurecat
usage: azurecat [-c <connection-string>] <blob-uri>
-c <arg> The connection string
-h The help information
--postfix <string> keep only the blob which has the path with the
specified postfix. The postfix only be used while
prefix is used.
--prefix cat all the blobs with the prefix
-v The version
-z The gzip format