#!/bin/bash
## RJP 12.7.2023
TEXTDOMAINDIR=/usr/share/locale
TEXTDOMAIN=simple-search
SEARCH=`yad --center --width=500 --height=100 --text-align=center --text=$"The word for searching" --entry --entry-label=$"here" --entry-text=""`
PLACE=`yad --file --directory --width=1000`
if [ $? = 0 ];
then
x-terminal-emulator -e /bin/bash -c "cd $PLACE && find -iname '*$SEARCH*' > /tmp/result.txt && xdg-open /tmp/result.txt" && \
sleep 1
rm /tmp/result.txt     
else exit 0
fi
