Sponsored Content
Top Forums Shell Programming and Scripting Finding a string inside A Tag Post 302443541 by dahlia84 on Monday 9th of August 2010 07:33:12 AM
Old 08-09-2010
Finding a string inside A Tag

I have umpteen number of files containing HTML A tags in the below format

Quote:
<a href="someurl.jsp?someparam&Login=$(someloginvalue)">
or

Quote:
<a href="someurl.jsp?Login=$(someloginvalue)">
I want to find all the lines that contain the word Login=

I used this command

Code:
grep "Login=" *

This gave me normal lines as well which contain the word Login= for example, it returned lines which have

Quote:
Login=AssignSomeValue;
this.Login=someValue;
How can I extract only those files which contain Login= in a A tag? Is it possible if yes, how can I do it?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding text inside file

Hi everyone I have a small problem i cant find a soloution to... I'm using digital unix and have to find out all the files which have a certain string inside them and i dont know how to do it. *This search is done as root. *All files from '/' to the last directory should be searched for... (3 Replies)
Discussion started by: dindan100
3 Replies

2. Shell Programming and Scripting

Capturing string between a xml tag

Hi All, I have an XML-: <ProcId>CES_P5010_AddVLan</ProcId> <DataVersion>yxcxycyxcycyxc</DataVersion> <JobId>OR3000055-002-1</JobId> </CesHeader> <VLanServiceList> <NopId>blu</NopId> </VLanServiceList> <StatusNPA>2</StatusNPA> ... (5 Replies)
Discussion started by: amit_iti
5 Replies

3. Shell Programming and Scripting

Extract value inside <text> tag for a particular condition.

Hi All! I have obtained following output from a tool "pdftohtml" :: So, my input is as under: <text top="246" left="160" width="84" height="16" font="3">Business purpose</text> <text top="260" left="506" width="220" height="16" font="3">giving the right information and new insights... (3 Replies)
Discussion started by: parshant_bvcoe
3 Replies

4. UNIX for Dummies Questions & Answers

Finding files with a certain name string inside of another file.

Hi, I have a very large file that contains a listing of all files on the system. I need to create a listing from that file of all files that start with the following format: s???_*, whereas the '?' represents characters, so the file name begins with an 's' followed by three other characters and... (4 Replies)
Discussion started by: tes218
4 Replies

5. Shell Programming and Scripting

How to remove string inside html tag <a>

Does anybody know how i can remove string from <a> tag? There are several hundred posts in a few forums that need to be cleaned up. The precise situation is ---------- <a href="http://mydomain.com/cgi-bin/anyboard.cgi?fvp=/family/sexuality_and_spirituality/&cmd=rA&cG=43"> ------------- my... (6 Replies)
Discussion started by: georgi58
6 Replies

6. Programming

Deciphering a tag character string

I have a string, eg 7f30.3 and I want to store things in the following way npos = 7 decform = true width = 30 ndp = 3 I need to read each character one by one. I am coding in fortran but I can try to code it should answer be given in C in the above way. (2 Replies)
Discussion started by: kristinu
2 Replies

7. Shell Programming and Scripting

Extracting a string from html tag

Hi I am new to string extractions in shell script... I am trying to extract a string such as #1753 from html tag looks like below. <a class="model-link tl-tr" href="lastSuccessfulBuild/">Last successful build (#1753), 40 min ago</a> and want the value as 1753 Could someone help me to... (3 Replies)
Discussion started by: hicharbo
3 Replies

8. Shell Programming and Scripting

How can i find texts inside a html tag using sed?

How can i find texts inside a html tag using sed? Html texts: What i tried: cat infile | sed -e 's/\(<kbd*\)\(.*\)\(kbd>\)/\2/ Expected result like this: sed -i -e 's/@colophon/@@colophon/' \ -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo (5 Replies)
Discussion started by: cola
5 Replies

9. Shell Programming and Scripting

How to check empty string in an XML tag?

I have an XML tag <abc> which is empty as <abc></abc>.If the the tag is empty I want to flag the file as bad. Please help. Thanks (3 Replies)
Discussion started by: aneeta13
3 Replies

10. Shell Programming and Scripting

awk to print string if tag is specific value

In the below awk I am trying to print expName only if another tag planExecuted is true. In addition to the expName I am also printing planShortID. For some reason the word experiment gets printed so I remove it with sed. I have attached the complete index.html as well as included a sample of it... (1 Reply)
Discussion started by: cmccabe
1 Replies
TIDYNODE(3)								 1							       TIDYNODE(3)

The tidyNode class

INTRODUCTION
An HTML node in an HTML file, as detected by tidy. CLASS SYNOPSIS
tidyNode tidyNode Properties o string$value o string$name o int$type o int$line o int$column o bool$proprietary o int$id o array$attribute o array$child Methods o tidyNode tidyNode::getParent (void ) o bool tidyNode::hasChildren (void ) o bool tidyNode::hasSiblings (void ) o bool tidyNode::isAsp (void ) o bool tidyNode::isComment (void ) o bool tidyNode::isHtml (void ) o bool tidyNode::isJste (void ) o bool tidyNode::isPhp (void ) o bool tidyNode::isText (void ) PROPERTIES
o $value -The HTML representation of the node, including the surrounding tags. o $name -The name of the HTML node o $type -The type of the tag (one of the constants above, e.g. TIDY_NODETYPE_PHP) o $line -The line number at which the tags is located in the file o $column -The column number at which the tags is located in the file o $proprietary -Indicates if the node is a proprietary tag o $id -The ID of the tag (one of the constants above, e.g. TIDY_TAG_FRAME) o $attribute - An array of string, representing the attributes names (as keys) of the current node. o $child - An array of tidyNode, representing the children of the current node. +--------+--------------------------------------------+ |Version | | | | | | | Description | | | | +--------+--------------------------------------------+ | 5.1.0 | | | | | | | $line, $column and $proprietary were added | | | | +--------+--------------------------------------------+ PHP Documentation Group TIDYNODE(3)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy