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
Post a Comment