I want to get a ZSH list from line split output. In my case, from the following command:
ssh myhost ls /Applications
I tried $(ssh myhost ls /Applications), but it does not work (it breaks into spaces as well).
$(ssh myhost ls /Applications)
lines=("${(@f)$(ssh myhost ls /Applications)}")
${(ps.\n.)"$(ssh myhost ls /Applications)"}
myarray=(${(f)"$(ssh myhost ls /Applications)"});
Source: https://habr.com/ru/post/1758610/More articles:split the console into two parts for two outputs - redirectВыбросить пользовательское исключение из метода реализации интерфейса - javajqueryui accordion disable specific tab - javascriptOver 4,294,967,296 in C? - cIs there a general way to set the DataContext of an ItemContainer under the mouse on a property of some other control? - wpfРезервное копирование MySQL на совместном хостинге в Windows, которое не позволяет удаленное подключение - windows8086 Assembler - Generating object code from operation codes - assemblyWPF application that outputs html - htmlHow to save custom node types in Drupal 7 - phpPython: Разрешить методы, которые не определены специально, называются ala __getattr__ - pythonAll Articles