When I run the below command, it outputs a list of columns as follows:
# rancher clusters
CURRENT ID STATE NAME PROVIDER
* abcd active test-cluster Imported
efgh active prod-cluster Imported
xyzd active dev-cluster Imported
When I try to print the NAME column, test-cluster is not returned in the results
# rancher clusters | awk '{print $3}'
STATE
active
prod-cluster
dev-cluster
You can see that parts of the STATE column show in the printed NAME column.
When I print the fourth column, test-cluster is returned along with NAME
# rancher clusters | awk '{print $4}'
NAME
test-cluster
Imported
Imported
Why isn't awk returning values from the exact column that is printed? What could cause values from one column to be returned in another column? My expectation is when I print $3, I will get all of the results in the fourth column (NAME).