![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ksh functions | scriptingmani | Shell Programming and Scripting | 3 | 07-06-2007 07:15 AM |
| finding duplicate files by size and finding pattern matching and its count | jerome Sukumar | Shell Programming and Scripting | 2 | 12-01-2006 04:20 AM |
| functions in | Raom | Shell Programming and Scripting | 6 | 07-21-2006 03:06 AM |
| Regarding functions | sendhilmani | Shell Programming and Scripting | 2 | 03-24-2006 04:40 AM |
| FTP functions | hzambra | High Level Programming | 3 | 05-03-2002 01:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
finding functions
I'm working on a project right now and I'm supposed to figure out how to go into a file located in a directory called ~cs252/Assingment/commandAsst/project/ and find all of the function calls to "sequentialInsert" and I tried using
grep "\<sequentialInsert\>"~cs252/Assingment/commandAsst/project/ and that didn't work...so I'm a little stuck right now...Could anyone point me in the right direction? Am I supposed to use some wildcards in place of sequentialInsert? |
|
||||
|
Hey, I tried that command that you posted for me and I got two error messages. "find: incomplete statement" and "sequentialInsert;: Command not found". Do you know what I'm doing wrong here? Thanks for the help.
|
|
|||||
|
Under Solaris, I had to add a space before the {}. Otherwise it just hung with no path info. Reference: The argument {} is replaced by the current path name.
So, find /cs252/Assingment/commandAsst/project/ -exec grep -l 'sequentialInsert' {} \; Cheers, Keith |
|
|||||
|
It should be a grep -l (as in the letter in the alphabet). Your text is a grep -| (as in the pipe).
From the grep man page: -l Print only the names of files with matching lines, separated by NEWLINE characters. Does not repeat the names of files when the pattern is found more than once. Cheers, Keith |
![]() |
| Bookmarks |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|