Below command is running on linux system and I want to save output as list.
root@Linux:~ kubectl get ns | awk '{print $1}'
NAME
b2
b6
b7
cert-manager
I need to save above command output in to variable as list.
Example:-
NAMESPACE = ['NAME', 'b2', 'b6', 'b7', 'cert-manager']
NAMESPACE is variable