Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to find function name based on word search Post 302333703 by spc432 on Tuesday 14th of July 2009 12:57:39 AM
Old 07-14-2009
How to find function name based on word search

Hi All,

I want to find out function name based on word.
Here i ll give u one example

I have several files based on below format. file will start and ends with same name only

EX: file1.txt
Code:
public function calculate1()
{
 ----
 ----
 call Global Function1()
 ----
 ----
} END public function calculate1()
public function calculate2()
{
 ----
 ----
 call Global Function1()
 ----
 ----
} END public function calculate2()
public function calculate3()
{
 ----
 ----
 call Global Function1()
 ----
 ----
} END public function calculate3()
public function calculate4()
{
 ----
 ----
 ----
 ----
} END public function calculate4()

my requirement : I need to find out function names based on "call Global Function1()"

my output should be :
Code:
public function calculate1()
public function calculate2()
public function calculate3()

Can u give any idea...how to proceed....

Thanks in advance....

Last edited by radoulov; 07-14-2009 at 04:01 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

search for hardlinks based on filename via find command

I am using command substitution into a find command in a script where I have built a menu to do a bunch of tasks within my unix account. When I choose the options for to find a file/files that have the same inode of the entered filename, ie hardlinks, nothing shows up. When I choose the appropiate... (2 Replies)
Discussion started by: hunternjb
2 Replies

2. UNIX for Dummies Questions & Answers

Using find command for timestamp based search

Hi, I am writing a script where i need to list all the files that have a scecific timestamp. I get this time stamp from another file. Is it possible to do this with 'find' command? Please let me know your valuable inputs. Thanks Sunny. (1 Reply)
Discussion started by: sunny_03
1 Replies

3. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

4. Shell Programming and Scripting

bash script to find date based on search string for continuesly updating file

Hi All, I am very new to UNIX and I have tried this for a longtime now and unable to crack it.... There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day..... eg: String is "work started" The log entry is as below: ... (1 Reply)
Discussion started by: Nithz
1 Replies

5. Shell Programming and Scripting

Find and copy files based on todays date and search for a particular string

Hi All, I am new to shell srcipting. Problem : I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
Discussion started by: mail.chiranjit
2 Replies

6. Shell Programming and Scripting

Search for the word and exporting 35 characters after that word using shell script?

I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance. My final goal is to... (11 Replies)
Discussion started by: sachit adhikari
11 Replies

7. Shell Programming and Scripting

Search for a specific word and print only the word from the input file

Hi, I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file. Ex: $ cat "sample.log" I am searching for a word which is present in this file We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

8. UNIX for Beginners Questions & Answers

Search for word in huge logfile and need to continue to print few lines from that line til find date

Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies

9. Shell Programming and Scripting

Script to find string based on pattern and search for its corresponding rows in column

Experts, Need your support for this awk script. we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file Need to grep row whose string contains 9K from column 1. When found... (6 Replies)
Discussion started by: as7951
6 Replies

10. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
REFLECTIONFUNCTIONABSTRACT(3)						 1					     REFLECTIONFUNCTIONABSTRACT(3)

The ReflectionFunctionAbstract class

INTRODUCTION
A parent class to ReflectionFunction, read its description for details. CLASS SYNOPSIS
ReflectionFunctionAbstract ReflectionFunctionAbstractReflector Properties o public$name Methods o finalprivate void ReflectionFunctionAbstract::__clone (void ) o public ReflectionClass ReflectionFunctionAbstract::getClosureScopeClass (void ) o public object ReflectionFunctionAbstract::getClosureThis (void ) o public string ReflectionFunctionAbstract::getDocComment (void ) o public int ReflectionFunctionAbstract::getEndLine (void ) o public ReflectionExtension ReflectionFunctionAbstract::getExtension (void ) o public string ReflectionFunctionAbstract::getExtensionName (void ) o public string ReflectionFunctionAbstract::getFileName (void ) o public string ReflectionFunctionAbstract::getName (void ) o public string ReflectionFunctionAbstract::getNamespaceName (void ) o public int ReflectionFunctionAbstract::getNumberOfParameters (void ) o public int ReflectionFunctionAbstract::getNumberOfRequiredParameters (void ) o public array ReflectionFunctionAbstract::getParameters (void ) o public string ReflectionFunctionAbstract::getShortName (void ) o public int ReflectionFunctionAbstract::getStartLine (void ) o public array ReflectionFunctionAbstract::getStaticVariables (void ) o public bool ReflectionFunctionAbstract::inNamespace (void ) o public bool ReflectionFunctionAbstract::isClosure (void ) o public bool ReflectionFunctionAbstract::isDeprecated (void ) o public bool ReflectionFunctionAbstract::isGenerator (void ) o public bool ReflectionFunctionAbstract::isInternal (void ) o public bool ReflectionFunctionAbstract::isUserDefined (void ) o public bool ReflectionFunctionAbstract::isVariadic (void ) o public bool ReflectionFunctionAbstract::returnsReference (void ) o abstractpublic void ReflectionFunctionAbstract::__toString (void ) PROPERTIES
o $name - Name of the function. Read-only, throws ReflectionException in attempt to write. PHP Documentation Group REFLECTIONFUNCTIONABSTRACT(3)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy