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
wxRegion(3erl)						     Erlang Module Definition						    wxRegion(3erl)

NAME
wxRegion - See external documentation: wxRegion. DESCRIPTION
See external documentation: wxRegion . DATA TYPES
wxRegion() : An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes. EXPORTS
new() -> wxRegion() See external documentation . new(X::term()) -> wxRegion() See external documentation . Alternatives: new(Bmp::wxBitmap:wxBitmap()) -> wxRegion() new(Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> wxRegion() new(TopLeft::{X::integer(), Y::integer()}, BottomRight::{X::integer(), Y::integer()}) -> wxRegion() See external documentation . new(X::integer(), Y::integer(), W::integer(), H::integer()) -> wxRegion() See external documentation . clear(This::wxRegion()) -> ok See external documentation . contains(This::wxRegion(), X::term()) -> WxRegionContain See external documentation . Alternatives: contains(This::wxRegion(), Pt::{X::integer(),Y::integer()}) -> WxRegionContain WxRegionContain = integer() WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion contains(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> WxRegionContain WxRegionContain = integer() WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion contains(This::wxRegion(), X::integer(), Y::integer()) -> WxRegionContain Types WxRegionContain = integer() See external documentation . WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion contains(This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> WxRegionContain Types WxRegionContain = integer() See external documentation . WxRegionContain is one of ?wxOutRegion | ?wxPartRegion | ?wxInRegion convertToBitmap(This::wxRegion()) -> wxBitmap() (see module wxBitmap) See external documentation . getBox(This::wxRegion()) -> {X::integer(), Y::integer(), W::integer(), H::integer()} See external documentation . intersect(This::wxRegion(), X::wxRegion() | term()) -> bool() See external documentation . Alternatives: intersect(This::wxRegion(), Region::wxRegion()) -> bool() intersect(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() intersect(This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool() See external documentation . isEmpty(This::wxRegion()) -> bool() See external documentation . subtract(This::wxRegion(), X::wxRegion() | term()) -> bool() See external documentation . Alternatives: subtract(This::wxRegion(), Region::wxRegion()) -> bool() subtract(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() subtract(This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool() See external documentation . offset(This::wxRegion(), Pt::{X::integer(), Y::integer()}) -> bool() See external documentation . offset(This::wxRegion(), X::integer(), Y::integer()) -> bool() See external documentation . union(This::wxRegion(), X::term()) -> bool() See external documentation . Alternatives: union(This::wxRegion(), Region::wxRegion() | wxBitmap:wxBitmap()) -> bool() union(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() union(This::wxRegion(), Bmp::wxBitmap() (see module wxBitmap), Transp::colour() (see module wx)) -> bool() Equivalent to union(This, Bmp, Transp, []) . union(This::wxRegion(), Bmp::wxBitmap() (see module wxBitmap), Transp::colour() (see module wx), Options::[Option]) -> bool() Types Option = {tolerance, integer()} See external documentation . union(This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool() See external documentation . Xor(This::wxRegion(), X::wxRegion() | term()) -> bool() See external documentation . Alternatives: 'Xor'(This::wxRegion(), Region::wxRegion()) -> bool() 'Xor'(This::wxRegion(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> bool() Xor(This::wxRegion(), X::integer(), Y::integer(), W::integer(), H::integer()) -> bool() See external documentation . destroy(This::wxRegion()) -> ok Destroys this object, do not use object again AUTHORS
<> wxErlang 0.98.9 wxRegion(3erl)
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy