Как я могу добавить пробелы между выводами, используя sed/echo или любую другую команду в Linux?
Предпочитаемый вывод:
Virtual Machine Test01 status Running.
Virtual Disk Test01 size 61GB
Physical Disk HITACHI (170)
Physical Disk HITACHI (171)
Physical Disk HITACHI (172)
Virtual Machine Test02 status Running.
Virtual Disk Test02 size 61GB
Physical Disk HITACHI (163)
Physical Disk HITACHI (164)
Physical Disk HITACHI (165)
Physical Disk HITACHI (173)
Virtual Machine Test03 status Running.
Virtual Disk Test03_DISK1 (33) size 61GB
Physical Disk HITACHI (137)
Physical Disk HITACHI (138)
Мой скрипт o/p:
cat /tmp/test.txt | while read in; do echo -en '\n'; ./ovm_vmdisks -u admin -p xxxxxx -h localhost -v "$in"; done | sed "s/'//g" | egrep -i "Virtual Machine|Virtual Disk|Physical Disk" |sed "s/://g" > /tmp/Automated/Virtualmachines_DETAILS.txt; cat /tmp/Automated/Virtualmachines_DETAILS.txt
Virtual Machine Test01 status Running.
Virtual Disk Test01 size 61GB
Physical Disk HITACHI (170)
Physical Disk HITACHI (171)
Physical Disk HITACHI (172) <<<< My First output ends here and right after this i would need spaces
Virtual Machine Test02 status Running.
Virtual Disk Test02 size 61GB
Physical Disk HITACHI (163)
Physical Disk HITACHI (164)
Physical Disk HITACHI (165)
Physical Disk HITACHI (173) <<<< Second one and so on
Virtual Machine Test03 status Running.
Virtual Disk Test03_DISK1 (33) size 61GB
Physical Disk HITACHI (137)
Physical Disk HITACHI (138)