use command line to open many files in Xcode

I have a non-Xcode project that has source code organized by a folder structure. The source code all resides in sub-folders of a single root folder.


I want to open the h and c files in Xcode just for reading purposes.


I can get the list of files using the command:

find ~/Documents/FTI/2017/Continental/reareCVP/eBike_Sandbox_C202/ -name "*\.[c|h]"


What I want to do is use the open command to take this list of files... something like, but not exactly,

open -a Xcode -f pbpaste


I also tried


pbpaste | open -a Xcode


Neither of these work.


To use pbpaste, I select the list of file names that resulted from the find command and pasted the list of path and names into a text edit document. Then I replaced all the returns with spaces so that the file path and names were space delimited. then I selected that list in the text document and copied it.


pbpaste returns what's on the clipboard



Thanks for any help or ideas.

Posted on Jul 17, 2017 6:43 AM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

use command line to open many files in Xcode

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.