In ksh shell I have ...
find . -name 'cp*'
which finds all files beginning with "cp" ... great!!!
BUT, I want to be able to have a variable in liu of the "cp*" like this:
var="'cp*'"
find . -name $var
or ...
var="cp*"
find . -name '$var'
Is there a way to escape the filename metacharacter "*" in this example?
find . -name 'cp*'
which finds all files beginning with "cp" ... great!!!
BUT, I want to be able to have a variable in liu of the "cp*" like this:
var="'cp*'"
find . -name $var
or ...
var="cp*"
find . -name '$var'
Is there a way to escape the filename metacharacter "*" in this example?