search whole line using grep

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting search whole line using grep
# 1  
Old 11-23-2007
search whole line using grep


how to search whole line using grep in a file.
# 2  
Old 11-23-2007
whole line is again a pattern

and grep is to search for patterns in a file

man grep
and search the forum
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Number of words in line, while loop, search and grep

Hello, What I wish to attain is: - to read fileA line by line - search entire line as string in fileB - when found, grep the next line in fileB - then merge "searched line" and "found line" in a new file, fileC Here is my fileA: T S Eliot J L Borges L Aragon L L Aragon T S Eliot 4 0... (17 Replies)
Discussion started by: baris35
17 Replies

2. Shell Programming and Scripting

Grep command to search a regular expression in a line an only print the string after the match

Hello, one step in a shell script i am writing, involves Grep command to search a regular expression in a line an only print the string after the match an example line is below /logs/GRAS/LGT/applogs/lgt-2016-08-24/ 19:12:48,602 ERROR... (9 Replies)
Discussion started by: Ramneekgupta91
9 Replies

3. UNIX for Dummies Questions & Answers

Grep? - using a file of terms to search another file when the information is on a different line

I have a flat file that looks like this, let's call it Chromosome_9.txt: FT /Gene_Name="Guanyl-Acetylase 9" FT /Gene_Number"36952" FT /Gene_Name="Endoplasmic Luciferase" FT /Gene_Number"36953" FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies

4. Shell Programming and Scripting

String: Grep / SED for multy line search

Hi, At first I want to please you to provide the solution with grep/sed if possible. :cool: File looks like: wished result: so I want in a new file BLUE@@RED string from first line like: grep "/folder_start" cs_src > tmp1 string from second line: grep "/main" cs_src... (14 Replies)
Discussion started by: unknown7
14 Replies

5. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

6. Shell Programming and Scripting

grep - search after line containing "unavailable"

Hi everybody; I have a file status.txt: Following 163 ports are up: ----------------------------------------------------- MOD PORT PORTNAMES ABCDEFG1 ABCDEFG2 STA TYPE 1 Prt122 port323-1/2/3 11111 11111 1111 A 1 Prt126 port328-1/2/3 11111 11111 ... (7 Replies)
Discussion started by: gc_sw
7 Replies

7. UNIX for Dummies Questions & Answers

Displaying the Second Line of the Grep Search Results

Hi I really hope someone can help with the below question. Lets say that I have a file called output.txt and I want to display all of the lines which contain the word ‘disconnect'. I know that this can easily be obtained by using the following command: grep -i disconnect output.txt However,... (6 Replies)
Discussion started by: Sunny Sid
6 Replies

8. UNIX for Dummies Questions & Answers

grep question: stop search from finding entire line

Sorry for the title, I really don't know how to word this question or what to even search for. I tried "grep one match", "grep 1 match", "stop grep" on both google and here and haven't found something that helps, so here I go: I have a file that's about 1.5 million lines long, every line looks... (3 Replies)
Discussion started by: rmoakler
3 Replies

9. UNIX for Dummies Questions & Answers

grep line pattern search

Hello everyone, I have been trying to get a list of all files containing a line of this type: };#followed by anything with any spaces (0 or more or 0 or more tabs) before the } and between each of the characters. I have been trying this : grep '*}*;*#*' *.c but I have not been fully... (1 Reply)
Discussion started by: gio001
1 Replies

10. UNIX for Dummies Questions & Answers

Multiple Line search using grep

Hi All, I am trying to search multiple lines in file using grep /sed.And i cant seem to make it work. The File looks like this 5012001,100,AUTOBATCH,FEE,DAILYFEE,0,0 4241 SERVICE DENIED 5012002,100,AUTOBATCH,FEE,DAILYFEE,0,0 4241 SERVICE DENIED... (6 Replies)
Discussion started by: pistachio
6 Replies
Login or Register to Ask a Question