View shell script output or execution when run in AppleScript

I am working on a simple AppleScript that runs the following ...

do shell script "diskutil partitionDisk /dev/disk1 1 APM JHFS+ Test 1G"

This is part of a larger script. The above works great, but is there a way to view progress? Everything will be really, it is desirable that the actual command in the terminal window is good.

thank

+3
source share
2 answers

do shell script AppleScript script . do shell script, , MKConsole, . :

do shell script "diskutil verifyPermissions // &> /output.log"

diskutil , , output.log, /. 0%... 10%... 20% , , .

MKConsole , .

script, AppleScript, logger. :

do shell script "logger -f /output.log The current count is: " & some_variable

AppleScript, , , script, logger - . logger script , , .

logger MKConsole, .

+2

diskutil:

"xterm -e 'diskutil partitionDisk /dev/disk1 1 APM JHFS+ Test 1G'"   xterm (1) diskutil. ( xterm), : . .

, script ( diskutil) .

+1

Source: https://habr.com/ru/post/1773673/


All Articles