Skip to content
forked from ericsk/azurecat

A CLI tool to cat microsoft azure blob storage

Notifications You must be signed in to change notification settings

curryshih/azurecat

 
 

Repository files navigation

azurecat

azurecat is a CLI tool to cat the microsoft azure blob storage.

Requirement

Java 6 or higher

Getting Start

  1. First, you must prepare your Connection String for your storage account. The format is

    DefaultEndpointsProtocol=[http|https];AccountName=myAccountName;AccountKey=myAccountKey
  2. Download from release.

  3. Run the command,

    azurecat -c <connection-string> http://<account-name>.blob.core.windows.net/<container-name>/<blob-path>

Configuration File

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>

Usage

  1. Print a resource

    azurecat https://<account-name>.blob.core.windows.net/<container-name>/<blob-path>
  2. Concatenate and print the resources with prefix

    azurecat --prefix https://<account-name>.blob.core.windows.net/<container-name>/<blob-prefix>
  3. 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>
  4. 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

About

A CLI tool to cat microsoft azure blob storage

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%