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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -