bash - formatting wildcard match in a variable for find -


im using find along arrays build command allow differing patterns in function. im placing -name , pattern in array. 1 pattern has space in , im struggling work out how should formatted find command recognises it:

this pattern:

   name_opts=( -name "* "  )    find  $home  "${name_opts[@]}" 

i thought escaping space backslash didn't work.also tried escaping double speech marks. looks ok on echo find doesnt recognise pattern.

"* " matches file names end in space. want "* *" matches file name contains space.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -