Files
2026-02-16 15:05:15 +01:00

28 lines
575 B
Bash

#!/bin/bash
#test=($(find /Library/Java/JavaVirtualMachines -type d -name '*.jdk' -prune -print))
test=("A" "J" "M")
echo ${test[@]}
#for i in "${test[@]}"; do
# echo $i
# var=$(echo $i)
# var=$((var + 1))
#done
#echo $var
#/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk
#/Library/Java/JavaVirtualMachines/zulu-8.jdk
osascript <<EOF
set theList to ${test[@]}
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
EOF