18 lines
401 B
Bash
18 lines
401 B
Bash
#!/bin/bash
|
|
|
|
bashList=($(find /Library/Java/JavaVirtualMachines -type d -name '*.jdk' -prune -print))
|
|
ListRes=$(printf -- "%s\n" "${bashList[@]}")
|
|
|
|
|
|
osascript <<OSA
|
|
|
|
set theList to "$ListRes"
|
|
repeat with a from 1 to length of theList
|
|
set theCurrentListItem to item a of theList
|
|
-- Process the current list item
|
|
display dialog theCurrentListItem & " is item " & a & " in the list."
|
|
end repeat
|
|
OSA
|
|
|
|
|