Sponsored Content
Full Discussion: Word Search
Top Forums Shell Programming and Scripting Word Search Post 302339796 by susau_79 on Friday 31st of July 2009 10:29:08 AM
Old 07-31-2009
I m getting memory coredump error as actual files having more than 15000 lines. Looks like gawk may work, so can you pls modify gawk command.

Quote:
Originally Posted by susau_79
Hi All,
I have almost 1000+ files and I want to search specific pattern. Looking forwarded your input. Pls note that need to ignore words in between /* */
Search for: "insert into xyz" (Which procedure contain all 3).
Expected output:
procedure test1
function test2
procedure test3

procedure test1
function test2
procedure test3
File Contain:
procedure test1
insert into xyz;
end;
FUNCTION
test2
insert
into
xyz
end;
procedure test3
insert /* asas*/
into xyz
end;
procedure test4
inserting into xyz
end;
 

10 More Discussions You Might Find Interesting

1. Solaris

Search about word

Dear I want syntax to help me to find text or word inside files. i written the following syntax but i dont take what i need ( find ~ -name ahmad -print ) i need syntax to explain or launch more detail about all files and folder contain ( ahmd ) inside it. (3 Replies)
Discussion started by: abu_hassan
3 Replies

2. Shell Programming and Scripting

Search for a word

I would like to retrieve the word from the following file filename abc.txt ------------------------------------------------------------------ Deadlock Id 28418: Process (Familyid 0, Spid 140) was waiting for a 'exclusive intent' lock on the 'request_copy_hist' table in database 4 b ut process... (2 Replies)
Discussion started by: on9west
2 Replies

3. Shell Programming and Scripting

Search the word to be deleted and delete lines above this word starting from P1 to P3

Hi, I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this: Records P1 10,23423432 ,77:1 ,234:2 P2 10,9089004 ,77:1 ,234:2 ,87:123 ,9898:2 P3 456456 P1 :123,456456546 P2 abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies

4. UNIX for Dummies Questions & Answers

Script to search for a particular word in files and print the word and path name

Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name". Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies

5. 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

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 $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Discussion started by: sachit adhikari
4 Replies

7. Shell Programming and Scripting

[Solved] Search for a word and print the next word

Hi, I am trying to search for a word and print the next word. For example: My text is "<TRANSFORMATION TYPE ="Lookup Procedure">" I am searching for "TYPE" and trying to print ="Lookup Procedure" I have written a code like following: echo $line | nawk... (4 Replies)
Discussion started by: sampoorna
4 Replies

8. 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

9. What is on Your Mind?

Updated Forum Search Index Min Word Length to 2 Chars and Added Quick Search Bar

Today I changed the forum mysql database to permit 2 letter searches: ft_min_word_len=2 I rebuilt the mysql search indexes as well. Then, I added a "quick search bar" at the top of each page. I have tested this and two letter searches are working; but it's not perfect,... (1 Reply)
Discussion started by: Neo
1 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
ldgetpd(3x)															       ldgetpd(3x)

Name
       ldgetpd - retrieve procedure descriptor given a procedure descriptor index

Syntax
       #include <stdio.h>
       #include <filehdr.h>
       #include <sym.h>
       #include <ldfcn.h>

       long ldgetpd (ldptr, ipd, ppd)
       LDFILE ldptr;
       long ipd;
       pPDR ipd;

Description
       The  function  returns  success	or  failure  depending	on  whether the procedure descriptor with index ipd can be accessed.  If it can be
       accessed, the structure pointed to by ppd is filled with the contents of the corresponding procedure descriptor.  The isym, iline, and iopt
       fields  of the procedure descriptor are updated to be used in further LD routine calls. The adr field is updated from the symbol referenced
       by the isym field.

       The PDR cannot be retrieved when the following occurs:

       o    The procedure descriptor table cannot be found.

       o    The ipd offset into the procedure descriptor table is beyond the end of the table.

       o    The file descriptor that the ipd offset falls into cannot be found.

       Typically, is called while traversing the table that runs from 0 to SYMHEADER(ldptr).ipdMax - 1.

See Also
       ldclose(3x), ldopen(3x), ldtbseek(3x), ldtbread(3x), ldfcn(5)

								       RISC							       ldgetpd(3x)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy