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
SSHFP(1)							  Internet / DNS							  SSHFP(1)

NAME
sshfp - Generate SSHFP DNS records from knownhosts files or ssh-keyscan SYNTAX
sshfp [-k <knownhosts_file>] [-d] [-a] | [<host1> [host2 ...]] sshfp -s [-p <port>] [-d] <-a> [-n <nameserver>] <domain1> [domain2] | <host1> [host2 ...] > DESCRIPTION
sshfp generates RFC4255 SSHFP DNS records based on the public keys stored in a known_hosts file, which implies the user has previously trusted this key, or public keys can be obtained by using ssh-keyscan (1). Using ssh-keyscan (1) implies a secure path to connect to the hosts being scanned. It also implies a trust in the DNS to obtain the IP address of the hostname to be scanned. If the nameserver of the domain allows zone tranfers (AXFR), an entire domain can be processed for all its A records. OPTIONS
-s / --scan <hostname1> [hostname2 ...] Scan hosts or domain for public SSH keys using ssh-keyscan -k / --knownhosts <knownhosts_file> <hostname1> [hostname2 ...] Obtain public SSH keys from a known_hosts file. Defaults to using ~/.ssh/known_hosts -a / --all Scan all hosts in the known_hosts file when used with -k. When used with -s, it will attempt an zone transfer (AXFR) to obtain all A records in the domain specified. -d / --trailing-dot Add a trailing dot to the hostname in the SSHFP records. It is not possible to determine whether a known_hosts or dns query is for a FQDN (eg www.xelerance.com) or not (eg www) or not (unless -d domainname -a is used, in which case a trailing dot is always appended). Non-FQDN get their domainname appended through /etc/resolv.conf These non-FQDN will happen when using a non-FQDN (eg sshfp -k www) or known_hosts entries obtained by running ssh www.sub where .domain.com is implied. When -d is used, all hostnames not ending with a dot, that at least contain two parts in their hostname (eg www.sub but not www get a trailing dot. Note that the output of sshfp can also just be manually editted for trailing dots. -o / --output <filename> Write to filename instead of stdout -p / --port <portnumber> Use portnumber for scanning. Note that portnumbers do NOT appear in SSHFP records. -h / --help Output help information and exit. -v / --version Output version information and exit. -q / --quiet Output less miscellany to stderr FILES
~/.ssh/known_hosts REQUIREMENTS
sshfp requires python-dns (http://www.pythondns.org) Fedora: yum install python-dns Debian: apt-get install python-dnspython BUGS
if a domain contains non-working glue A records, then ssh-keyscan aborts instead of skipping the single broken entry. This program can look up hashed hostnames in a known_hosts file if a recent-enough ssh-keygen is present EXAMPLES
typical usage: sshfp (implies -k -a) sshfp -a -d (implies -k) sshfp -k bofh.xelerance.com (from known_hosts) sshfp -s bofh.xelerance.com (from a scan to the host) sshfp -k ~paul/.ssh/known_hosts bofh.xelerance.com www.openswan.org -o /tmp/mysshfp.txt sshfp -a -d -d xelerance.com -n ns0.xelerance.net >> /var/named/primary/xelerance.com SEE ALSO
ssh-keyscan(1) ssh(1) and RFC-4255 http://www.xelerance.com/software/sshfp/ http://lists.xelerance.com/mailman/listinfo/sshfp/ AUTHORS
Paul Wouters <paul@xelerance.com>, Jacob Appelbaum <jacob@appelbaum.net>, James Brown <jbrown@yelp.com> COPYRIGHT
Copyright 2006-2010 Xelerance Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License (file COPYING in the distribution) for more details. Paul Wouters April 12, 2011 SSHFP(1)
All times are GMT -4. The time now is 09:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy