Rapid fire: one-liners for JSON, YAML and cloud CLIs.
BeginnerConceptBest practices and rapid-fire commands
Answer
kubectl get pods -A -o json | jq -r '.items[] | select(.status.phase!="Running") | "\(.metadata.namespace)/\(.metadata.name)"'
kubectl get deploy -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.replicas}{"\n"}{end}'
aws sts get-caller-identity --query Arn --output text
aws s3 ls "s3://$bucket/servers/$(hostname -s)/" | tail -n 3
yq '.services | keys' compose.yaml
jq -r 'to_entries[] | "\(.key)=\(.value)"' config.json > app.env
curl -fsS https://api.github.com/repos/cli/cli/releases/latest | jq -r .tag_name
More on Best practices and rapid-fire commands
What does a production-ready script template look like?AdvancedWhat logging practices do you follow in automation scripts?IntermediateHow do you make a script support a dry-run mode cleanly?BeginnerRapid fire: one-liners for disk, memory and process checks.BeginnerRapid fire: one-liners for logs and text.BeginnerRapid fire: one-liners for files and housekeeping.Beginner