A snippet of my code is shown below. The script currently closes if its not able to find the path.
[echo "could not find $REPLY, ensure the path is correct and try again"]
Instead I would like it at this point to loop back and try to accept input again for the path. How would I do this?
while [ $choice -eq 3 ]; do
read choice
if [ $choice -eq 1 ] ; then
echo "You have chosen to spec.... '/path/../'"
read
if [ -d $REPLY ]; then
find $REPLY -type f -printf '%TY-%Tm-%Td %.8TT %p\n '| sort -r | head -20
else
echo "could not find $REPLY, ensure the path is correct and try again"
fi
else