我目前正在努力生成一个文本文件,该文件仅包含目录或其子目录中的.sph文件的完整路径。
例子:
树
├── mwhw
│ ├── an151-mwhw-b.sph
│ ├── an152-mwhw-b.sph
│ ├── an153-mwhw-b.sph
│ ├── an154-mwhw-b.sph
│ ├── an155-mwhw-b.sph
│ ├── cen1-mwhw-b.sph
│ ├── cen2-mwhw-b.sph
│ ├── cen3-mwhw-b.sph
│ ├── cen4-mwhw-b.sph
│ ├── cen5-mwhw-b.sph
│ ├── cen6-mwhw-b.sph
│ ├── cen7-mwhw-b.sph
│ └── cen8-mwhw-b.sph
├── spk2utt
├── text
├── utt2spk
├── wav.scp
└── words.txt
我如何生成一个仅向我提供.sph文件路径的文本文件?
要获取相对于当前目录(.
)的路径,您可以使用
find . -name '*.sph' > filelist
如果您想要完整的绝对路径,请尝试
find $PWD -name '*.sph' > filelist
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句