I have a command that I want to run from a shell script which is:
vim-cmd vmsvc/getallvms
I would like to turn the output of this command into a variable which is:
60 abc-trunk [xxxxx] abc-trunk/abc-trunk.vmx rhel6_64Guest vmx-10 xxxx OEM, CentOS 6.7, latest trunk install from xxxx.yyyyyy.com
I would like to turn the output into a variable and trim everything out of the variable so all I am left with is a variable that will read "abc-trunk"