Skip to content

Commit

Permalink
awk to jsonpath
Browse files Browse the repository at this point in the history
  • Loading branch information
olegvorobiov committed Sep 5, 2024
1 parent e775e7a commit fd6fe5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/rancher/cluster-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#######################################
rancher_list_clusters() {
echo "Listing clusters registered in Rancher..."
kubectl get clusters.provisioning.cattle.io --all-namespaces | awk 'NR>1 {print $2}'
kubectl get clusters.provisioning.cattle.io --all-namespaces -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'
}

#######################################
Expand Down

0 comments on commit fd6fe5c

Please sign in to comment.