Jean-Luc Arnaud
2018-09-26 15:58:15 UTC
Hi all,
I'm trying to code a Unix script in order to eject a RAM Disk.
Using:
diskutil list | grep 'RAM Disk' | awk '{print $6}'
I'm able to get the disk ref (i.e. Disk1).
But trying:
diskutil eject |diskutil list | grep 'RAM Disk' | awk '{print $6}'
I can't achieve what I need.
Maybe, I should use a variable, but I don't know how to assign diskutil
list | grep 'RAM Disk' | awk '{print $6}' to a variable.
TIA for any help.
I'm trying to code a Unix script in order to eject a RAM Disk.
Using:
diskutil list | grep 'RAM Disk' | awk '{print $6}'
I'm able to get the disk ref (i.e. Disk1).
But trying:
diskutil eject |diskutil list | grep 'RAM Disk' | awk '{print $6}'
I can't achieve what I need.
Maybe, I should use a variable, but I don't know how to assign diskutil
list | grep 'RAM Disk' | awk '{print $6}' to a variable.
TIA for any help.
--
Jean-Luc Arnaud
Jean-Luc Arnaud