i have single column which is starting with same string(many number of rows)
i have to convert each into a single row.how can i do that?
laknar
std
mes
23
55
laknar
isd
phone no
address
amount
99
I have to convert above like below.
laknar|std|mes|23|55
laknar|isd|phone... (3 Replies)
hey guys...
Im looking to do the following:
1
2
3
4
5
6
7
8
9
Change to:
1 4 7
2 5 8
3 6 9
Did use | perl -lpe'$\=$.%3?$":"\n"' , but it doesnt give me the matrix i want. (3 Replies)
Hi all,
I need to convert this file having just one column into two column file
current file:
a
15
b
21
c
34
d
48
e
10
wanted:
a 15
b 21
c 34 (15 Replies)
Hello Friends,
I am trying to implement the following using UNIX. I am getting a sequential file as input which would have two columns, "Name" and "Countries Visited". The "Countries Visisted" field will be multi-valued, each value separated by a space and also the number of values are not... (2 Replies)
Hi pls help me out to short out this problem
rm PAB113_011.out
rm: PAB113_011.out: override protection 644 (yes/no)? n
If i give y it remove the file.
But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (7 Replies)
Dear fellows, I need your help.
I'm trying to write a script to convert a single column into multiple rows.
But it need to recognize the beginning of the string and set it to its specific Column number.
Each Line (loop) begins with digit (RANGE).
At this moment it's kind of working, but it... (6 Replies)
Hi,
I have input dataset as below:
Cl.jenn,1051,ABCD
JEN.HEA,9740|1517|8119|2145,ZZZZ,REPEAT
Rich.Sm,
Ann.Car,3972|4051|1064|4323|4122|2394|2574|4507
Sta.for,7777,ABCD,UUUU
Sm.Ric,
Ch.LRD,
Eh.ab,
Gr.sh,
Expected output:
-------------------
Cl.jenn,1051,ABCD... (6 Replies)
Discussion started by: saravananravim
6 Replies
LEARN ABOUT DEBIAN
net::whois::parser
Net::Whois::Parser(3pm) User Contributed Perl Documentation Net::Whois::Parser(3pm)NAME
Net::Whois::Parser - module for parsing whois information
SYNOPSIS
use Net::Whois::Parser;
my $info = parse_whois( domain => $domain );
my $info = parse_whois( raw => $whois_raw_text, domain => $domain );
my $info = parse_whois( raw => $whois_raw_text, server => $whois_server );
$info = {
nameservers => [
{ domain => 'ns.example.com', ip => '123.123.123.123' },
{ domain => 'ns.example.com' },
],
emails => [ 'admin@example.com' ],
domain => 'example.com',
somefield1 => 'value',
somefield2 => [ 'value', 'value2' ],
...
};
# Your own parsers
sub my_parser {
my ( $text ) = @_;
return {
nameservers => [
{ domain => 'ns.example.com', ip => '123.123.123.123' },
{ domain => 'ns.example.com' },
],
emails => [ 'admin@example.com' ],
somefield => 'value',
somefield2 => [ 'value', 'value2' ],
};
}
$Net::Whois::Parser::PARSERS{'whois.example.com'} = &my_parser;
$Net::Whois::Parser::PARSERS{'DEFAULT'} = &my_default_parser;
# If you want to get all values of fields from all whois answers
$Net::Whois::Parser::GET_ALL_VALUES = 1;
# example
# Net::Whois::Raw returns 2 answers
$raw = [ { text => 'key: value1' }, { text => 'key: value2'}];
$data = parse_whois(raw => $raw);
# If flag is off parser returns
# { key => 'value2' };
# If flag is on parser returns
# { key => [ 'value1', 'value2' ] };
# If you want to convert some field name to another:
$Net::Whois::Parser::FIELD_NAME_CONV{'Domain name'} = 'domain';
# If you want to format some fields.
# I think it is very useful for dates.
$Net::Whois::Parser::HOOKS{'expiration_date'} = [ &format_date ];
DESCRIPTION
Net::Whois::Parser module provides Whois data parsing. You can add your own parsers for any whois server.
FUNCTIONS
parse_whois(%args)
Returns hash of whois data. Arguments:
'domain' -
domain
'raw' -
raw whois text
'server' -
whois server
'which_whois' -
option for Net::Whois::Raw::whois. Default value is QRY_ALL
CHANGES
See file "Changes" in the distribution
AUTHOR
Ivan Sokolov, "<ivsokolov@cpan.org>"
COPYRIGHT & LICENSE
Copyright 2009 Ivan Sokolov
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-20 Net::Whois::Parser(3pm)