I'm trying to get stored in a variable the output of a command chain with awk, but the result is incomplete,
this is what im trying to do.
nameserver="nas_server -list all | awk '{print $6}'"
eval $nameserver
nameserverreal=$nameserver |awk '/encap|nameserver_/{ print }'
eval $nameserverreal
I'm using this command nas_server and with awk print 6, only get some output from my command nas_server.
What i need is to filter later the output only with "nameserver_" and storage the output in a variable, so i can print it, and use it later convined with other commands.