From 3f57ccad6a7b5b2c2c4b3b314d8bb4b7a750f7de Mon Sep 17 00:00:00 2001 From: Phil Sweeney <150720+phils@users.noreply.github.com> Date: Mon, 2 Nov 2026 17:03:18 +1100 Subject: [PATCH 1/2] fix(ec2-metadata): add -q short option and clarify --quiet help text --- ec2-metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ec2-metadata b/ec2-metadata index 0dea7cf..5df5329 100755 --- a/ec2-metadata +++ b/ec2-metadata @@ -41,7 +41,7 @@ Options: -s/--security-groups Names of the security groups the instance is launched in. Only available if supplied at instance launch time -d/--user-data User-supplied data.Only available if supplied at instance launch time. -g/--tags Tags assigned to this instance. ---quiet Suppress tag keys from the output. +-q/--quiet Suppress metric and tag keys from the output (value only). --path Show metadata information from the specified path. Can be specified multiple times." } @@ -189,7 +189,7 @@ fi declare -a actions declare -a paths -shortopts=almnbithokzPcpvuresdgR +shortopts=almnbithokzPcpvuresdgRq longopts=(ami-id ami-launch-index ami-manifest-path ancestor-ami-ids block-device-mapping instance-id instance-type local-hostname local-ipv4 kernel-id availability-zone partition product-codes public-hostname public-ipv4 public-keys ramdisk-id @@ -213,7 +213,7 @@ while true; do print_help ; shift exit 0 ;; - --quiet) + -q|--quiet) QUIET=1 ; shift ;; --path) From 30079128cae08dc9ae7ac0b21a01362e162cefb4 Mon Sep 17 00:00:00 2001 From: Phil Sweeney <150720+phils@users.noreply.github.com> Date: Tue, 3 Nov 2026 11:02:21 +1100 Subject: [PATCH 2/2] docs: clarify tag behavior for --quiet and update manpage --- doc/ec2-metadata.8 | 2 +- ec2-metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ec2-metadata.8 b/doc/ec2-metadata.8 index 6c7be46..eb59def 100644 --- a/doc/ec2-metadata.8 +++ b/doc/ec2-metadata.8 @@ -116,7 +116,7 @@ User-supplied data.Only available if supplied at instance launch time. .B \-t/\-\-tags Print EC2 resource tags if permitted in EC2 Instance Metadata Options. .TP -.B \-\-quiet +.B \-q/\-\-quiet Don't print metadata keys .TP .B \-\-path diff --git a/ec2-metadata b/ec2-metadata index 5df5329..97b87d9 100755 --- a/ec2-metadata +++ b/ec2-metadata @@ -41,7 +41,7 @@ Options: -s/--security-groups Names of the security groups the instance is launched in. Only available if supplied at instance launch time -d/--user-data User-supplied data.Only available if supplied at instance launch time. -g/--tags Tags assigned to this instance. --q/--quiet Suppress metric and tag keys from the output (value only). +-q/--quiet Print values only, without metric names (tag names are kept for -g/--tags). --path Show metadata information from the specified path. Can be specified multiple times." }