문제

I want to generate docs for coffee-script files. I want to use Docco.

When i use:

docco client/coffee/*

it throws error. I think because folders are in file list. When i use:

docco client/coffee/*.coffee

it cant' find some files, because i havent anithing in root folder.

How to give all *.coffee files recursievly to command in console?

도움이 되었습니까?

해결책

There are several ways to do it

$ find client/coffee/ -name '*.coffee' -exec docco {} +

$ find client/coffee/ -name '*.coffee' | xargs docco

However, note that the latter way does not work if there is space in file name, unless you use find -print0 with combination of xargs -0.

Additionally, if you are using bash, you can use **/*.coffee with setting shopt -s globstar

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top