Sponsored Content
Top Forums Shell Programming and Scripting Search for a whole line in a file Post 302338211 by Shazin on Monday 27th of July 2009 09:35:57 AM
Old 07-27-2009
Search for a whole line in a file

Hi All,

Please can anyone advise how can I search a whole line in a file.

Best Regards,
Shazin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search in a file and get the next line as well

Hi All, i'm new here in the forum and UNIX too. I have a quick question. I have a file containing the following lines: 3:40:27 su :0002:9999:2:399 'su sdfrun' succeeded for root on /dev/??? 23:40:29 su :0005:0342:2:1 Disk Utilization threshold What i want to... (2 Replies)
Discussion started by: turi
2 Replies

2. UNIX for Dummies Questions & Answers

how can search a String in one text file and replace the whole line in another file

i am very new to UNIX plz help me in this scenario i have two text files as below file1.txt name=Rajakumar. Discipline=Electronics and communication. Designation=software Engineer. file2.txt name=Kannan. Discipline=Mechanical. Designation=CADD Design Engineer. ... (6 Replies)
Discussion started by: kkraja
6 Replies

3. Shell Programming and Scripting

Search first line of file

Hello, I'm doing a script and wanted to look inside a word file and return me the first line number where you will find that word. Thank you very much Example( serach name) : hello my name ---> Line 3 is charles and name is --> this NO!!! only 3 beautiful (5 Replies)
Discussion started by: uri_crack
5 Replies

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

5. Shell Programming and Scripting

Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB).

Hi Experts, I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Discussion started by: manishkomar007
7 Replies

6. Shell Programming and Scripting

search a string in a particular column of file and return the line number of the line

Hi All, Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example : abc.txt 7000,john,2,1,0,1,6 7001,elen,2,2,0,1,7 7002,sami,2,3,0,1,6 7003,mike,1,4,0,2,1 8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

7. Shell Programming and Scripting

PERL or SHELL Scrript to search in Directories by taking line by line from a text file

Unix box server version *********** >uname -r B.11.00 >echo $SHELL /usr/bin/ksh --> in this server, I have the path like /IMbuild/dev/im0serv1 ---> in that directory I have the folders startup(.jsp files nearly 100 jsp's ) and scripts(contains .js files nearly 100 files) ... (9 Replies)
Discussion started by: pasam
9 Replies

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

9. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

10. Shell Programming and Scripting

Search words in multiple file line by line

Hi All I have to search servers name say like 1000+ "unique names" line by line in child.txt files in another file that is a master file where all server present say "master.txt",if child.txt's server name matches with master files then it print yes else no with server name. (4 Replies)
Discussion started by: netdbaind
4 Replies
HP-SEARCH-MAC(1)					User Contributed Perl Documentation					  HP-SEARCH-MAC(1)

NAME
hp-search-mac -- HP switch search tool. DESCRIPTION
HP-search-MAC is an util that can query HP switches for their connection table. It then allow you to search for a MAC address and tell you where it is physically connected (best match first). . The functionality is similar to traceroute but on Ethernet level and only for HP switches. USAGE
hp-search-mac [options] [MAC] [...] OPTIONS
hp-search-mac [options] mac [ [options] mac ] [...] options: --dl n Set debug level to n. --help Print this help. --hostname host[=>community] | -h host[=>community] Set a switch name to search. You can also set this in /etc/hp-search-mac.conf or ~/.hp-search-mac.conf. The hash to set is \%switches. Mac: You can use some different formats: ff:ff:ff:ff:ff:ff (hex) ff-ff-ff-ff-ff-ff (hex) 0.123.0.12.0.12.0 (dec) CONFIGURATION: \%switches: This is a normal perl hash of the form \%switches = ("host" => "community", ...); AUTHOR
Ola Lundqvist <ola@inguza.com> SEE ALSO
snmp-walk(1) snmp-get(1) hp-search-mac Mon Apr 7 21:21:44 CEST 2008 HP-SEARCH-MAC(1)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy