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:
parent
d63c0ce73d
commit
76a8137b2c
1 changed files with 3 additions and 0 deletions
3
cool_oneliners/parse_aws_s3_ls.nu
Normal file
3
cool_oneliners/parse_aws_s3_ls.nu
Normal 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 ' '
|
Loading…
Add table
Add a link
Reference in a new issue