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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
hp-search-mac
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)