We use phpDocumentator to document our php code.
The php code is in different dictionaries.
The script which runs the phpDocumentator looks like this:
./phpdoc -d dir1,dir2,dir3,dir4
Every time we add a new directory, I have to add this one to the script.
I would like to do this dynamically.
ls -d ../*test*
this lists all needed directories but space separated and not comma separated.
Question:
How can I list the directories comma separated?
how can I add this list as -d parameter to the phpdoc script?
Use
ls -dm */to generate a comma-separated list of directories.-dwill return directories only and-mwill output to a comma-separated list.You could then store the output in a variable and pass it along as an argument: