amazon-glacier-cmd-interface icon indicating copy to clipboard operation
amazon-glacier-cmd-interface copied to clipboard

Shell-script friendly ouput mode and return codes

Open ikatson opened this issue 12 years ago • 0 comments

Hi,

I assume that many usecases of glacier-cmd are integrating it into various backup scripts. No of the current output modes are shell-script friendly. For example, to get a list of vaults, which can be iterated in the shell, I do

glacier-cmd --output csv lsvault | cut -d , -f 4 | tr -d '"' | tail -n +2

while something like

glacier-cmd [--output=shell] lsvault

would be a lot more shell-friendly.

And the program always returns 0, while returning 1 sometimes would benefit. Consider the search command, which could use grep-style return codes, i.e. 0 if something was found and 1 if not.

Cheers, Igor Katson.

P.S. Thanks for a very cool and useful tool, I like it better than "glacier.py" which has more stars on github, at least cause your one uses Amazon for persistent storage, which allows backing up from different machines.

ikatson avatar May 12 '13 19:05 ikatson