Script dynamic find

Hi everyone, im try to write a small script to do something like this

new_find.sh

#!/usr/bin/ksh

PAR=$1
PATH1=$2

find $PATH1 -name $PAR

i need to pass the mask of the find by parameter but this dont work

sh new_find *.sql /home/somthing

any tip ?

thanks!

#!/usr/bin/ksh



find "$2" -name "$1" 

usage

sh new_find '*.sql' /home/somthing
1 Like
PATH1=$1
PARAM=$2

find "$PATH1" -name "$PARAM"
1 Like

really thanks guys!!

srry for the newbie question!