Sponsored Content
Full Discussion: Remove a ^M character
Top Forums Shell Programming and Scripting Remove a ^M character Post 302334030 by zajtat on Tuesday 14th of July 2009 02:08:17 PM
Old 07-14-2009
I apologize!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove last character of a term

Hi All, I have a few terms with a comma as the last character. Can any experts show me how to remove the last character? Note the the length of the term is not fix. Input: 1, 2, 12, 14, 103, 198, 3006, Output, 1 (6 Replies)
Discussion started by: Raynon
6 Replies

2. UNIX for Advanced & Expert Users

To remove new line character

Hi, I am facing one interesting problem : I have a file which contains data like this 459,|1998-11-047|a |b |c \n efg | d|e | \n 459,|1998-11-047|a \n c|b |c \n efg | d|e | \n Basically what I have to do is , I have to remove all \n which is coming ( enclosed ) in between... (7 Replies)
Discussion started by: shihabvk
7 Replies

3. UNIX for Dummies Questions & Answers

How to remove \ character

Dear Members, I have a file which is a single line file. It has "\" character and i need to replace this character with a new line character. How can we do this? I tried with sed but it did not work. sed 's//"\n"/g' t1 > t2Thanks Sandeep (3 Replies)
Discussion started by: sandeep_1105
3 Replies

4. HP-UX

How to remove new line character and append new line character in a file?

Hi Experts, I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line. File is comma (,) seperated. Eg: ID,Client ,SNo,Rank 37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies

5. Shell Programming and Scripting

How to remove first 2 character from file name

Hi All Please help me to remove the first 2 character from the file name. files are like this $ ls 12aman file 13atul si 56rana se I want to remove the first 2 char which are numbers. I want the o/p like thus aman file atul si rana se (8 Replies)
Discussion started by: atul9806
8 Replies

6. Shell Programming and Scripting

Remove last character from filename

Hi All, I have different type of file (.txt,.csv,.xml) format in my current directory. My requirement is that I need to remove the last character from the file format. Example count.txt$ csp_rules.csv^ Date.xml~ Need Output: count.txt csp_rules.csv Date.xml How to do that?.... (5 Replies)
Discussion started by: suresh01_apk
5 Replies

7. Shell Programming and Scripting

remove the first and last character of a string

How can i remove the first and last character of strings like below: "^^^613*" "admt130" "^^^613*" "123456" "adg8484" "DQitYV09dh1C" Means i wanna remove the quotes(""). Please help (17 Replies)
Discussion started by: proactiveaditya
17 Replies

8. Shell Programming and Scripting

Remove last newline character..

Hi all.. I have a text file which looks like below: abcd efgh ijkl (blank space) I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file. I have tried options like... (14 Replies)
Discussion started by: Sathya83aa
14 Replies

9. Shell Programming and Scripting

How to remove newline character if it is the only character in the entire file.?

I have a file which comes every day and the file data look's as below. Vi abc.txt a|b|c|d\n a|g|h|j\n Some times we receive the file with only a new line character in the file like vi abc.txt \n (8 Replies)
Discussion started by: rak Kundra
8 Replies

10. UNIX for Beginners Questions & Answers

Remove character \r and \n in awk

Hi Everybody: I need your help, please... I have this file *.txt 0000 | 16010201 22000000 67892000 00000000 00000000 00000100 72246681 28E08236 | ~~~~"~~~g~ ~~~~~~~~~~~~~r$f~(~~6 | 0020 | 10476173 90010100 10000000 00000001 05000226 17163011 12442212 48140484 |... (2 Replies)
Discussion started by: solaris21
2 Replies
Net::Whois::Raw(3pm)					User Contributed Perl Documentation				      Net::Whois::Raw(3pm)

NAME
Net::Whois::Raw - Get Whois information for domains SYNOPSIS
use Net::Whois::Raw; $dominfo = whois('perl.com'); ($dominfo, $whois_server) = whois('funet.fi'); $reginfo = whois('REGRU-REG-RIPN', 'whois.ripn.net'); $arrayref = get_whois('yahoo.co.uk', undef, 'QRY_ALL'); $text = get_whois('yahoo.co.uk', undef, 'QRY_LAST'); ($text, $srv) = get_whois('yahoo.co.uk', undef, 'QRY_FIRST'); $Net::Whois::Raw::OMIT_MSG = 1; # This will attempt to strip several known copyright # messages and disclaimers sorted by servers. # Default is to give the whole response. $Net::Whois::Raw::CHECK_FAIL = 1; # This will return undef if the response matches # one of the known patterns for a failed search, # sorted by servers. # Default is to give the textual response. $Net::Whois::Raw::CHECK_EXCEED = 1; # When this option is set, "die" will be called # if connection rate to specific whois server have been # exceeded $Net::Whois::Raw::CACHE_DIR = "/var/spool/pwhois/"; # Whois information will be # cached in this directory. Default is no cache. $Net::Whois::Raw::CACHE_TIME = 60; # Cache files will be cleared after not accessed # for a specific number of minutes. Documents will not be # cleared if they keep get requested for, independent # of disk space. $Net::Whois::Raw::TIMEOUT = 10; # Cancel the request if connection is not made within # a specific number of seconds. @Net::Whois::Raw::SRC_IPS = (11.22.33.44); # List of local IP addresses to # use for WHOIS queries. Addresses will be used used # successively in the successive queries $Net::Whois::Raw::POSTPROCESS{whois.crsnic.net} = &my_func; # Call to a user-defined subroutine on whois result, # depending on whois-server. # Above is equil to: # ($text, $srv) = whois('example.com'); # $text = my_func($text) if $srv eq 'whois.crsnic.net'; DESCRIPTION
Net::Whois::Raw queries WHOIS servers about domains. The module supports recursive WHOIS queries. Also queries via HTTP is supported for some TLDs. Setting the variables $OMIT_MSG and $CHECK_FAIL will match the results against a set of known patterns. The first flag will try to omit the copyright message/disclaimer, the second will attempt to determine if the search failed and return undef in such a case. IMPORTANT: these checks merely use pattern matching; they will work on several servers but certainly not on all of them. FUNCTIONS
whois( DOMAIN [, SRV [, WHICH_WHOIS]] ) Returns Whois information for "DOMAIN". Without "SRV" argument default Whois server for specified domain name zone will be used. Use 'www_whois' as server name to force WHOIS querying via HTTP (only few TLDs are supported in HTTP queries). Caching is supported: if $CACHE_DIR variable is set and there is cached entry for that domain - information from the cache will be used. "WHICH_WHOIS" argument - look get_whois docs below. get_whois( DOMAIN [, SRV [, WHICH_WHOIS]] ) Lower-level function to query Whois information for "DOMAIN". Caching IS NOT supported (caching is implemented only in higher-level "whois" function). Without "SRV" argument default Whois server for specified domain name zone will be used. "WHICH_WHOIS" argument is used to access a results if recursive queries; possible values: 'QRY_FIRST' - returns results of the first query. Non't make recursive queries. In scalar context returns just whois text. In list context returns two values: whois text and whois server which was used to make query). 'QRY_LAST' - returns results of the last query. In scalar context returns just whois text. In list context returns two values: whois text and whois server which was used to make query). This is the default option. 'QRY_ALL' - returns results of the all queries of the recursive chain. Reference to array of references to hashes is returned. Hash keys: "text" - result of whois query, "srv" - whois server which was used to make query. USER DEFINED FUNCTIONS
whois_query_sockparams( DOMAIN, SRV ) You can set your own IO::Socket::INET params like this: *Net::Whois::Raw::whois_query_sockparams = sub { my $class = shift; my $domain = shift; my $name = shift; return ( PeerAddr => $name, PeerPort => 43, # LocalHost => , # LocalPort => ); }; whois_query_socket( DOMAIN, SRV ) You can set your own IO::Socket::INET like this: *Net::Whois::Raw::whois_query_socket = sub { my $class = shift; my $domain = shift; my $name = shift; $name .= ':43'; return IO::Socket::INET->new(); }; whois_query_ua( DOMAIN, SRV ) You can set your own LWP::UserAgent like this: *Net::Whois::Raw::whois_query_ua = sub { my $class = shift; my $domain = shift; return LWP::UserAgent->new(); }; AUTHOR
Original author Ariel Brosh schop@cpan.org, Inspired by jwhois.pl available on the net. Since Ariel has passed away in September 2002: Past maintainers Gabor Szabo gabor@perl.org.il, Corris Randall corris@cpan.org Current Maintainer: Walery Studennikov despair@cpan.org CREDITS
See file "Changes" in the distribution for the complete list of contributors. CHANGES
See file "Changes" in the distribution NOTE
Some users complained that the die statements in the module make their CGI scripts crash. Please consult the entries on eval and die on perlfunc about exception handling in Perl. COPYRIGHT
Copyright 2000--2002 Ariel Brosh. Copyright 2003--2003 Gabor Szabo. Copyright 2003--2003 Corris Randall. Copyright 2003--now() Walery Studennikov. This package is free software. You may redistribute it or modify it under the same terms as Perl itself. I apologize for any misunderstandings caused by the lack of a clear licence in previous versions. COMMERCIAL SUPPORT
Not available anymore. LEGAL
Notice that registrars forbid querying their whois servers as a part of a search engine, or querying for a lot of domains by script. Also, omitting the copyright information (that was requested by users of this module) is forbidden by the registrars. SEE ALSO
pwhois, whois. perl v5.10.1 2011-03-20 Net::Whois::Raw(3pm)
All times are GMT -4. The time now is 11:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy