I want to find all the file names present in SVN that contain spaces and special characters

痴心易碎 提交于 2019-12-25 05:17:09

问题


I want to find all the file names present in SVN that contain spaces and special characters and put them in temp.txt. I don't have a path for that. I need to find file names in subfolders as well.

I tried the following command, but it is not working.

find.-type f|egrep-i"~||&|@|#|<|>|;|:|!|'^'|,|-|_"|tee temp.txt

What is it doing wrong?


回答1:


You're regex is wrong. Try this:

find . -type f | egrep -i "[-~&@#<>;:!^,_]" | tee temp.txt

You want to specify the characters to find and that is just what [] is for. I may have missed a few characters you meant, so double check I included them all.

Also note that this command will find any file in the directory - it may or may not be part of the repo.



来源:https://stackoverflow.com/questions/22076350/i-want-to-find-all-the-file-names-present-in-svn-that-contain-spaces-and-special

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!