[PD] finding source file of vanilla object

IOhannes m zmölnig zmoelnig at iem.at
Tue Dec 23 20:23:55 CET 2014


On 12/23/2014 08:12 PM, Jonghyun Kim wrote:
> thanks for the answer!
> 
> I tried to find with grep, but it doesn't work...
> 
> *akntk at umi:~/Downloads/pd-0.46-4$ grep '"metro"' *.c*
> *grep: *.c: No such file or directory*

all C-source files (that's all of Pd without the GUI), lives in the
"src" folder.

zmoelnig at XXX:~$ cd ~/src/pd/src/
zmoelnig at XXX:~/src/pd/src$ grep '"metro"' *.c
x_time.c:    metro_class = class_new(gensym("metro"),
(t_newmethod)metro_new,
zmoelnig at XXX:~/src/pd/src$

you could also use grep's "-r" flag to recursively search files in
subdirectories, and the "-l" flag to only show the filename (and not the
line containing the keyword).



zmoelnig at XXX:~$ cd ~/src/pd/
zmoelnig at XXX:~/src/pd$  $ grep -r -l '"metro"' .
./doc/5.reference/timer-help.pd
./doc/1.manual/x5.htm
./src/x_time.c
zmoelnig at XXX:~/src/pd$

obviously there are more files containing "metro" in quotes.
note that i now use '.' as the "file" to search (which means the current
directory; as i do a recursive search, this will search all files in all
subdirectories of the current dir).


you might also want to have a look at the manpage of "grep" to learn
more about it.

$ man grep


gfdsmr
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20141223/24ffc353/attachment.sig>


More information about the Pd-list mailing list