Getting weird error.
basically this script delete the search in the search for .ipa file in serverpath=/home/gyke69/Desktop/ and it delete the .ipa & .ipa.plist file by choosing in list.
find: paths must precede expression: 'delete'
find: possible unquoted pattern after predicate '-type'?
#!/bin/bash
basedir=/home/gyke69/Desktop/zadmin-update/
serverpath=/home/gyke69/Desktop/
#!/bin/bash
prompt="Please select a file:"
options=( $(find $serverpath -type f -name "*.ipa" -printf "%f\n") )
PS3="$prompt "
select opt in "${options[@]}" "Quit" ; do
if (( REPLY == 1 + ${#options[@]} )) ; then
exit
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
echo "You picked $opt which is file $REPLY"
break
else
echo "Invalid option. Try another one."
fi
done
find $basedir -name $opt -type f -delete
find $basedir -name $opt.ipa.plist -type f delete