Sponsored Content
Full Discussion: Search String
Contact Us Post Here to Contact Site Administrators and Moderators Search String Post 302167132 by ajithshankar@ho on Wednesday 13th of February 2008 02:10:38 PM
Old 02-13-2008
Search String

Hi I have a file with multiple fields,

I want to search for two strings "DONOTUSE" and "DO NOT USE" from the first field.

Cand anyone help me how to do this...

Thnks,
Ajith
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

2. Shell Programming and Scripting

Search, replace string in file1 with string from (lookup table) file2?

Hello: I have another question. Please consider the following two sample, tab-delimited files: File_1: Abf1 YKL112w Abf1 YAL054c Abf1 YGL234w Ace2 YKL150w Ace2 YNL328c Cup9 YDR441c Cup9 YDR442w Cup9 YEL040w ... File 2: ... ABF1 YKL112W ACE2 YLR131C (9 Replies)
Discussion started by: gstuart
9 Replies

3. Shell Programming and Scripting

search string in a file and retrieve 10 lines including string line

Hi Guys, I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same. can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies

4. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

5. Shell Programming and Scripting

Search one string and then search another string in the next line

I am unable to use grep comman to Print only EmpPosition and if the EmpID next line. So output should be both EmpPosition and EmpID and also EmpPosition and EmpID data should match. Sample Data EmpPosition "New" EmpID "New" - - EmpPosition "New" ... (4 Replies)
Discussion started by: onesuri
4 Replies

6. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

7. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

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

9. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies

10. UNIX for Beginners Questions & Answers

How to use a grep search to search for a specific string within multiple directories?

Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried: grep -lr "this string" * but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
AnyEvent::XMPP::Ext::DataForm(3pm)			User Contributed Perl Documentation			AnyEvent::XMPP::Ext::DataForm(3pm)

NAME
AnyEvent::XMPP::Ext::DataForm - XEP-0004 DataForm SYNOPSIS
DESCRIPTION
This module represents a Data Form as specified in XEP-0004. METHODS
new (%args) append_field ($field) This method appends a field to the form. $field must have the structure as described in "FIELD STRUCTURE" below. from_node ($node) This method interprets the AnyEvent::XMPP::Node object in $node as data form XML node and reads out the fields and all associated information. ($node must be the XML node of the <x xmlns='jabber:x:data'> tag). make_answer_form ($request_form) This method initializes this form with default answers and other neccessary fields from $request_form, which must be of type AnyEvent::XMPP::Ext::DataForm or compatible. The result will be a form with a copy of all fields which are not of type "fixed". The fields will also have the default value copied over. The form type will be set to "submit". The idea is: this creates a template answer form from $request_form. To strip out the unneccessary fields later you don't need call the "clear_empty_fields" method. clear_empty_fields This method removes all fields that have no values and options. remove_field ($field_or_var) This method removes a field either by it's unique name or by reference. $field_or_var can either be the unique name or the actual field hash reference you get from "get_field" or "get_fields". set_form_type ($type) This method sets the type of the form, which must be one of: form, submit, cancel, result form_type This method returns the type of the form, which is one of the options described in "set_form_type" above or undef if no type was yet set. get_reported_fields If this is a search result this method returns more than one element here. The returned list consists of fields as described in "FIELD STRUCTURE", only that they lack values and options. See also the "get_items" method. get_items If this form is a search result this method returns the list of items of that search. An item is a array ref of fields (field structure is described in "FIELD STRUCTURE"). This method returns a list of items. get_fields This method returns a list of fields. Each field has the structure as described in "FIELD STRUCTURE". get_field ($var) Returns the field with the unique field name $var or undef if no such field is in this form. set_field_value ($var, $value) This method sets the value of the field with the unique name $var. If the field has supports multiple values all values will be removed and only $value will be added, if $value is undefined the field's value will be deleted. add_field_value ($var, $value) This method adds the $value to the field with the unique name $var. If the field doesn't support multiple values this method has the same effect as "set_field_value". to_simxml This method converts the form to a data strcuture that you can pass as "node" argument to the "simxml" function which is documented in AnyEvent::XMPP::Util. Example call might be: my $node = $form->to_simxml; simxml ($w, defns => $node->{ns}, node => $node); NOTE: The returned simxml node has the "dns" field set so that no prefixes are generated for the namespace it is in. as_debug_string This method returns a string that represents the form. Only for debugging purposes. FIELD STRUCTURE
{ label => 'field label', type => 'field type', var => '(unique) field name' required => true or false value, values => [ 'value text', ... ], options => [ ['option label', 'option text'], ... ] } For the semantics of all fields please consult XEP 0004. SEE ALSO
XEP 0004 AUTHOR
Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>" COPYRIGHT &; LICENSE Copyright 2007, 2008 Robin Redeker, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-23 AnyEvent::XMPP::Ext::DataForm(3pm)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy