Hello guys,
I have a problem to pass a variable ($optn) containing quoted wild card to FIND command. for exsample.
Please give your advise to make it work.
Thanks in advance.
I have a problem to pass a variable ($optn) containing quoted wild card to FIND command. for exsample.
Code:
#$1=name
#$2=*.log
if [ "$1" == "name" ]; then
optn="-name '$2'"
else
optn="-mtim +$2"
fi
find . -type f $optn -ls
Thanks in advance.