串我有命名的文件夾:擊:更換空字符串
example1 example2 example3
我想從他們每個人提取的例子數。例如:
for exampleSubfolder in `find . -type d`
do
example_number= #replace 'example' in $exampleSubfolder with empty string
#do other stuff in this subfolder
done
任何簡單的方法來做到這一點?
如果您的文件夾是在當前目錄中,'爲exampleSubfolder例如/'避免了'find'調用。 – tripleee 2012-08-13 10:01:26