linux - How can I search for files in directories that contain spaces in names, using "find"? -
how can search files in directories contain spaces in names, using find
? use script
#!/bin/bash in `find "/tmp/1/" -iname "*.txt" | sed 's/[0-9a-za-z]*\.txt//g'` j in `ls "$i" | grep sh | sed 's/\.txt//g'` find "/tmp/2/" -iname "$j.sh" -exec cp {} "$i" \; done done
but files , directories contain spaces in names not processed?
this grab files have spaces in them
$ls more space nospace stillnospace space $find -type f -name "* *" ./this space ./more space
Comments
Post a Comment