Sponsored Content
Full Discussion: Remove last pattern
Top Forums Shell Programming and Scripting Remove last pattern Post 302769056 by anil510 on Monday 11th of February 2013 06:11:32 AM
Old 02-11-2013
Remove last pattern

I have a file with entries below.
Code:
domain1.com.http:
domain2.com.49503:

I need this to be sorted like below. ie remove the patten after the last right-hand side . (dot).
Code:
domain1.com
domain2.com

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed remove everything up to the pattern

I have been search all over the internet to find a solution to this. I have a file that looks like: -a ItemConfig.custom=true -a Config.custom=true go -t malu -t Use=true I want to get "malu" as output, and the werid thing is the blank before go is neither space nor tab. what's the sed... (4 Replies)
Discussion started by: katrvu
4 Replies

2. UNIX for Advanced & Expert Users

Program to remove a pattern

Hi, I want to remove all occurances of a character which follows a ^ symbol. For ex: This is a Test ^H^@^@^@^@^@^@ File used in VI. ^@^@^B^VDM-BM-$|M-^_M-F^AM- In the above example, I should remove all characters which follows a ^. (^H ^@ ^B ^V etc) and It should print This is a Test... (4 Replies)
Discussion started by: arsheshadri
4 Replies

3. Shell Programming and Scripting

How to remove a file with a particular pattern

Hi I have a list of files in a folder.I have a search pattern in the file name and i want to remove the file with that pattern.How can that be made List of files xxxxx.ID1.yyyyy.zzzzz yyyy.ID2.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz yyyy.ID4.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz... (2 Replies)
Discussion started by: sparks
2 Replies

4. Shell Programming and Scripting

How to remove all text except pattern

i have nasty html file with 2000+ simbols in 1 row...i need to remove whole the code except title="Some title..." and store those into file with titles (the whole text is in variable text) i've tried something like this: echo $text | sed 's/.*\(title=\".+\"\).*/\1/' > titles.html BUT it does... (13 Replies)
Discussion started by: Lukasito
13 Replies

5. Shell Programming and Scripting

remove pattern with sed

Hi, i want to remove a certain pattern when i type pwd. pwd will look like this: ..../....../....../Pat_logs/..../....../...../...... the dotted lines are just random directory names, i want it to remove the "Pat_logs/...../....../....../" part so for example: ... (5 Replies)
Discussion started by: a27wang
5 Replies

6. Shell Programming and Scripting

Remove all line below the pattern

I have few files i want to delete all line before match and also print the match line. like Can anyone help. (8 Replies)
Discussion started by: james1988
8 Replies

7. Shell Programming and Scripting

Search a pattern in a line and remove another pattern

Hi, I want to search a pattern in a text file and remove another pattern in that file. my text file look like this 0.000000 1.970000 F 303 - 1.970000 2.080000 VH VH + 2.080000 2.250000 VH VH + 2.250000 2.330000 VH L - 2.330000 2.360000 F H + 2.360000 2.410000 L VL - 2.410000 ... (6 Replies)
Discussion started by: sreejithalokkan
6 Replies

8. UNIX for Advanced & Expert Users

How to remove a char before a pattern?

Hi I have a file where i want to remove a char before a specific pattern. exp: CREATE TABLE ( A, B, C, ----comma needs to be removed )AS SELECT A, B, C, ----comma needs to be removed FROM TABLE. So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
Discussion started by: raju2016
11 Replies

9. Shell Programming and Scripting

How to remove the lines with this pattern?

Hello everyone, I have a sample data like this: Glyma.10G051100 Glyma.02G036000 89.91 228 23 0 1 228 1 228 1e-78 294 Glyma.10G051100 Glyma.09G023700 87.28 228 29 0 1 228 1 228 1e-68 261 Glyma.10G285200 Glyma.20G103800 96.33 1663 55 4 1 1657 1 1663 0.0 2728 Glyma.10G285200 Glyma.05G093700 95.02... (2 Replies)
Discussion started by: nengcheng
2 Replies

10. UNIX for Beginners Questions & Answers

awk to remove pattern and lines above pattern

In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Discussion started by: cmccabe
2 Replies
Mail::SpamAssassin::Plugin::URIDNSBL(3pm)		User Contributed Perl Documentation		 Mail::SpamAssassin::Plugin::URIDNSBL(3pm)

NAME
URIDNSBL - look up URLs against DNS blocklists SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::URIDNSBL uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT DESCRIPTION
This works by analysing message text and HTML for URLs, extracting the domain names from those, querying their NS records in DNS, resolving the hostnames used therein, and querying various DNS blocklists for those IP addresses. This is quite effective. USER SETTINGS
skip_uribl_checks ( 0 | 1 ) (default: 0) Turning on the skip_uribl_checks setting will disable the URIDNSBL plugin. By default, SpamAssassin will run URI DNSBL checks. Individual URI blocklists may be disabled selectively by setting a score of a corresponding rule to 0 or through the uridnsbl_skip_domain parameter. See also a related configuration parameter skip_rbl_checks, which controls the DNSEval plugin (documented in the Conf man page). uridnsbl_skip_domain domain1 domain2 ... Specify a domain, or a number of domains, which should be skipped for the URIBL checks. This is very useful to specify very common domains which are not going to be listed in URIBLs. clear_uridnsbl_skip_domain [domain1 domain2 ...] If no argument is given, then clears the entire list of domains declared by uridnsbl_skip_domain configuration directives so far. Any subsequent uridnsbl_skip_domain directives will start creating a new list of skip domains. When given a list of domains as arguments, only the specified domains are removed from the list of skipped domains. RULE DEFINITIONS AND PRIVILEGED SETTINGS
uridnsbl NAME_OF_RULE dnsbl_zone lookuptype Specify a lookup. "NAME_OF_RULE" is the name of the rule to be used, "dnsbl_zone" is the zone to look up IPs in, and "lookuptype" is the type of lookup (TXT or A). Note that you must also define a body-eval rule calling "check_uridnsbl()" to use this. Example: uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT body URIBL_SBLXBL eval:check_uridnsbl('URIBL_SBLXBL') describe URIBL_SBLXBL Contains a URL listed in the SBL/XBL blocklist uridnssub NAME_OF_RULE dnsbl_zone lookuptype subtest Specify a DNSBL-style domain lookup with a sub-test. "NAME_OF_RULE" is the name of the rule to be used, "dnsbl_zone" is the zone to look up IPs in, and "lookuptype" is the type of lookup (TXT or A). "subtest" is a sub-test to run against the returned data. The sub-test may be in one of the following forms: m, n1-n2, or n/m, where n,n1,n2,m can be any of: decimal digits, 0x followed by up to 8 hexadecimal digits, or an IPv4 address in quad-dot form. The 'A' records (IPv4 dotted address) as returned by DNSBLs lookups are converted into a numerical form (r) and checked against the specified sub-test as follows: for a range n1-n2 the following must be true: (r >= n1 && r <= n2); for a n/m form the following must be true: (r & m) == (n & m); for a single value in quad-dot form the following must be true: r == n; for a single decimal or hex form the following must be true: (r & n) != 0. Some typical examples of a sub-test are: 127.0.1.2, 127.0.1.20-127.0.1.39, 127.0.1.0/255.255.255.0, 0.0.0.16/0.0.0.16, 0x10/0x10, 16, 0x10 . Note that, as with "uridnsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. Example: uridnssub URIBL_DNSBL_4 dnsbl.example.org. A 127.0.0.4 uridnssub URIBL_DNSBL_8 dnsbl.example.org. A 8 urirhsbl NAME_OF_RULE rhsbl_zone lookuptype Specify a RHSBL-style domain lookup. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). Note that you must also define a body-eval rule calling "check_uridnsbl()" to use this. An RHSBL zone is one where the domain name is looked up, as a string; e.g. a URI using the domain "foo.com" will cause a lookup of "foo.com.uriblzone.net". Note that hostnames are stripped from the domain used in the URIBL lookup, so the domain "foo.bar.com" will look up "bar.com.uriblzone.net", and "foo.bar.co.uk" will look up "bar.co.uk.uriblzone.net". If an URI consists of an IP address instead of a hostname, the IP address is looked up (using the standard reversed quads method) in each "rhsbl_zone". Example: urirhsbl URIBL_RHSBL rhsbl.example.org. TXT urirhssub NAME_OF_RULE rhsbl_zone lookuptype subtest Specify a RHSBL-style domain lookup with a sub-test. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). "subtest" is a sub-test to run against the returned data. The sub-test may be in one of the following forms: m, n1-n2, or n/m, where n,n1,n2,m can be any of: decimal digits, 0x followed by up to 8 hexadecimal digits, or an IPv4 address in quad-dot form. The 'A' records (IPv4 dotted address) as returned by DNSBLs lookups are converted into a numerical form (r) and checked against the specified sub-test as follows: for a range n1-n2 the following must be true: (r >= n1 && r <= n2); for a n/m form the following must be true: (r & m) == (n & m); for a single value in quad-dot form the following must be true: r == n; for a single decimal or hex form the following must be true: (r & n) != 0. Some typical examples of a sub-test are: 127.0.1.2, 127.0.1.20-127.0.1.39, 127.2.3.0/255.255.255.0, 0.0.0.16/0.0.0.16, 0x10/0x10, 16, 0x10 . Note that, as with "urirhsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. Example: urirhssub URIBL_RHSBL_4 rhsbl.example.org. A 127.0.0.4 urirhssub URIBL_RHSBL_8 rhsbl.example.org. A 8 urinsrhsbl NAME_OF_RULE rhsbl_zone lookuptype Perform a RHSBL-style domain lookup against the contents of the NS records for each URI. In other words, a URI using the domain "foo.com" will cause an NS lookup to take place; assuming that domain has an NS of "ns0.bar.com", that will cause a lookup of "bar.com.uriblzone.net". Note that hostnames are stripped from both the domain used in the URI, and the domain in the lookup. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). Note that, as with "urirhsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. urinsrhssub NAME_OF_RULE rhsbl_zone lookuptype subtest Specify a RHSBL-style domain-NS lookup, as above, with a sub-test. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). "subtest" is the sub-test to run against the returned data; see <urirhssub>. Note that, as with "urirhsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. urifullnsrhsbl NAME_OF_RULE rhsbl_zone lookuptype Perform a RHSBL-style domain lookup against the contents of the NS records for each URI. In other words, a URI using the domain "foo.com" will cause an NS lookup to take place; assuming that domain has an NS of "ns0.bar.com", that will cause a lookup of "ns0.bar.com.uriblzone.net". Note that hostnames are stripped from the domain used in the URI. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). Note that, as with "urirhsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. urifullnsrhssub NAME_OF_RULE rhsbl_zone lookuptype subtest Specify a RHSBL-style domain-NS lookup, as above, with a sub-test. "NAME_OF_RULE" is the name of the rule to be used, "rhsbl_zone" is the zone to look up domain names in, and "lookuptype" is the type of lookup (TXT or A). "subtest" is the sub-test to run against the returned data; see <urirhssub>. Note that, as with "urirhsbl", you must also define a body-eval rule calling "check_uridnsbl()" to use this. tflags NAME_OF_RULE ips_only Only URIs containing IP addresses as the "host" component will be matched against the named "urirhsbl"/"urirhssub" rule. tflags NAME_OF_RULE domains_only Only URIs containing a non-IP-address "host" component will be matched against the named "urirhsbl"/"urirhssub" rule. ADMINISTRATOR SETTINGS
uridnsbl_max_domains N (default: 20) The maximum number of domains to look up. NOTES
The "uridnsbl_timeout" option has been obsoleted by the "rbl_timeout" option. See the "Mail::SpamAssassin::Conf" POD for details on "rbl_timeout". perl v5.14.2 2011-06-06 Mail::SpamAssassin::Plugin::URIDNSBL(3pm)
All times are GMT -4. The time now is 11:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy