Reputation: 68140
I want to get a ZSH list from a line-separated output. In my case, from the following command:
ssh myhost ls /Applications
I tried $(ssh myhost ls /Applications)
but that doesn't work (it splits also at spaces).
Upvotes: 3
Views: 462
Reputation: 107759
lines=("${(@f)$(ssh myhost ls /Applications)}")
Upvotes: 2