From bb19fddc618ada58cf637542544fe82adca16738 Mon Sep 17 00:00:00 2001 From: Jan Klass Date: Sat, 19 Apr 2025 15:47:13 +0200 Subject: [PATCH] Port `before_v0.60` `parse_aws_s3_ls.nu` (#1086) Tested with https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html example output Note that the script has a placeholder parameter `s3://your-bucket-and-path`. The script is moved into the `sourced` folder like all the other ported scripts from the cool_oneliners folder before it, but sourcing it as-is is not meaningful. This ports the last file in `before_v0.60`, consequently resolving #221. --- before_v0.60/cool_oneliners/parse_aws_s3_ls.nu | 3 --- sourced/cool-oneliners/parse_aws_s3_ls.nu | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 before_v0.60/cool_oneliners/parse_aws_s3_ls.nu create mode 100644 sourced/cool-oneliners/parse_aws_s3_ls.nu diff --git a/before_v0.60/cool_oneliners/parse_aws_s3_ls.nu b/before_v0.60/cool_oneliners/parse_aws_s3_ls.nu deleted file mode 100644 index a1b4771..0000000 --- a/before_v0.60/cool_oneliners/parse_aws_s3_ls.nu +++ /dev/null @@ -1,3 +0,0 @@ -# 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 ' ' diff --git a/sourced/cool-oneliners/parse_aws_s3_ls.nu b/sourced/cool-oneliners/parse_aws_s3_ls.nu new file mode 100644 index 0000000..fef0f1f --- /dev/null +++ b/sourced/cool-oneliners/parse_aws_s3_ls.nu @@ -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 { str replace ' ' ' ' | str replace ' ' ' ' } | split column ' '