1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

add a one liner to parse aws s3 ls output

This demonstrates a simple transformation to trim excess spaces so you
can easily split by space into a nice nu table.

A more robust approach would be to look for JSON output from s3
subcommands and simply ingest that.

But space delimited output rules the world of unixy `ls`.
This commit is contained in:
Eli Flanagan 2021-05-03 14:52:13 -04:00
parent d63c0ce73d
commit 76a8137b2c

View file

@ -0,0 +1,3 @@
# transform the aligned text output of aws s3 ls into something useful
# presumes you have the aws CLI
aws s3 ls s3://your-bucket-and-path | lines | each { echo $it | str find-replace ' ' ' ' | str find-replace ' ' ' ' } | split column ' '