Sponsored Content
Top Forums Shell Programming and Scripting remove contents including the tag if pattern matches Post 302527386 by sanjuabraham on Friday 3rd of June 2011 08:00:20 AM
Old 06-03-2011
Here are another injected patterns


Code:
<a href=\"http://cialis-pharmacy-review.com\">Cialis</a>

<a href=\"http://cialis-pharmacy-review.com\">Cheap Cialis Super Active</a>

<a href=\"http://cialis-pharmacy-review.com\">Buy Cialis Super Active</a>

Database contents including the pattern

---------------------------------
Code:
<a title=\"Emotional Wealth Secret: Developing Emotional Awareness\" href=\"http://emotionalwealthacademy.com/ews-developing-emotional-awareness/\">Read and Download the Emotional Wealth Secret Fact Sheet: <a href=\"http://cialis-pharmacy-review.com\">Buy Cialis Super Active</a>

---------------------------------

My idea is creating a script and given the pattern "pharmacy" so that it will delete the line including the tags . From <a href=....................</a>
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting XML Tag Contents

Hi Jean I require your help in writing a shell script. Iam zero in Unix programming. I have a large file about 400 MB of data, which contains about 50000 XML messages seperated by a Tab, I think. I need to extract only 4 values from each XML message and write it onto a new file. Please help me... (2 Replies)
Discussion started by: pk_eee
2 Replies

2. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

3. Shell Programming and Scripting

Remove if the above line matches pattern

but keep if does not I have a file: --> my.out foo: bar foo: moo blarg i am on vacation foo: goose foo: lucy foo: moose foo: stucky groover@monkey.org foo: bozo grimace@gonzo.net dear sir - blargo blargo foo: goon foo: sloppy foo: saudi gimme gimme gimme (3 Replies)
Discussion started by: spacegoose
3 Replies

4. Shell Programming and Scripting

Search for Pattern and Print including Lines in between

Gurus, I have a big file that needs to be sorted out and I cant figure out what to do. The file name is as below: Name: xxxx yyyy nnnn Description: dfffgs sdgsgsf hsfhhs afgghhjdgj fjklllll gsfhfh Updated: jafgadsgg gsg Corrected: date today The file consists of line like these. ... (13 Replies)
Discussion started by: The One
13 Replies

5. Shell Programming and Scripting

NAWK to remove lines that matches a specific pattern

Hi, I have requirement that I need to split my input file into two files based on a search pattern "abc" For eg. my input file has below content abc defgh zyx I need file 1 with abc and file2 with defgh zyx I can use grep command to acheive this. But with grep I need... (8 Replies)
Discussion started by: sbhuvana20
8 Replies

6. UNIX for Dummies Questions & Answers

If user input matches file contents

I was wondering how I can read values from a file and then proceed if those values match a user input. For example (a simple one), a user inputs their name, then we check if that name is in a file of usernames. If it is, it says proceed, if not, then it says you are not authorized. ... (5 Replies)
Discussion started by: DBnixUser
5 Replies

7. Shell Programming and Scripting

How to use ls with pattern and including path?

Hello to all, Maybe someone could help me, my question is: How can a filter the print of command ls for the files with names of the form "abc*.txt" including the path? I've done this: If I move with command cd to /My/Path/Is/This/ and send this command: ls -lst abc*.txt -i... (37 Replies)
Discussion started by: Ophiuchus
37 Replies

8. Shell Programming and Scripting

Remove entire line from a file if 1st column matches a pattern

I have one requirement to delete all lines from a file if it matches below scenario. File contains three column. Employee Number, Employee Name and Employee ID Scenario is: delete all line if Employee Number (1st column) contains below 1. Non-numeric Employee Number 2. Employee Number that... (3 Replies)
Discussion started by: anshu ranjan
3 Replies

9. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

Hi Forum. I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script. Any feedback will be greatly appreciated. ... (19 Replies)
Discussion started by: pchang
19 Replies

10. Shell Programming and Scripting

Delete a pattern including any whitespace before it and after it

Hello. A_LIGNE="cnezJ,V ,FMZ fd,Mok CODKJ,F SOME_WORD fcnQ, VMQKV Q" A_PATTERN="SOME_WORD" sed 's/'$A_PATTERN'//g' <<< "$A_LINE"will remove 'SOME_WORD' and give : "cnezJ,V ,FMZ fd,Mok CODKJ,F fcnQ, VMQKV Q"A_PATTERN="SOME_WORD]" sed 's/'$A_PATTERN'//g' <<< "$A_LINE"will remove... (4 Replies)
Discussion started by: jcdole
4 Replies
hwloc_obj_attr_u::hwloc_bridge_attr_s(3)		     Hardware Locality (hwloc)			  hwloc_obj_attr_u::hwloc_bridge_attr_s(3)

NAME
hwloc_obj_attr_u::hwloc_bridge_attr_s - SYNOPSIS
#include <hwloc.h> Data Fields union { struct hwloc_pcidev_attr_s pci } upstream hwloc_obj_bridge_type_t upstream_type union { struct { unsigned short domain unsigned char secondary_bus unsigned char subordinate_bus } pci } downstream hwloc_obj_bridge_type_t downstream_type unsigned depth Detailed Description Bridge specific Object Attribues. Field Documentation unsigned hwloc_obj_attr_u::hwloc_bridge_attr_s::depth unsigned short hwloc_obj_attr_u::hwloc_bridge_attr_s::domain union { ... } hwloc_obj_attr_u::hwloc_bridge_attr_s::downstream hwloc_obj_bridge_type_t hwloc_obj_attr_u::hwloc_bridge_attr_s::downstream_type struct hwloc_pcidev_attr_s hwloc_obj_attr_u::hwloc_bridge_attr_s::pci struct { ... } hwloc_obj_attr_u::hwloc_bridge_attr_s::pci unsigned char hwloc_obj_attr_u::hwloc_bridge_attr_s::secondary_bus unsigned char hwloc_obj_attr_u::hwloc_bridge_attr_s::subordinate_bus union { ... } hwloc_obj_attr_u::hwloc_bridge_attr_s::upstream hwloc_obj_bridge_type_t hwloc_obj_attr_u::hwloc_bridge_attr_s::upstream_type Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.7 Sun Apr 7 2013 hwloc_obj_attr_u::hwloc_bridge_attr_s(3)
All times are GMT -4. The time now is 03:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy