Hi, Does anyone have an examples of using fnmatch in a shell script? I am fairly new to shell script and have written the following but just get a syntax error on the fnmatch line... can someone please help?
#!/bin/bash
export P=0
export pendingDir=/export/home/shahzads/fakepending/
for filename in 'find $pendingDir -name "*.data" -print'
do (
if ['fnmatch("*data" $filename)']
then
echo "match found"
fi
)
done
Thanks in advance
SS