Hi,
Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent.
E.g : username empid
------------------------
sri 123
to
username,empid
sri,123
Thanks,
Hema:confused: (2 Replies)
Hello,
I have a log file which contains data in tabular format(3 columns(total, posted, rejected) and 2 rows(close, total)) as below.
TOTAL POSTED REJECTED
CLOSE 3 3 0
TOTAL 3 3 0
I have to search for all Total... (1 Reply)
Hi all,
Is there a way to convert full data matrix to linearised left data matrix?
e.g full data matrix
Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7
Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245
Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
is it possible to count the number of keys based on state and cell and output it as a simple matrix.
Ex: cell1-state1 has 2 keys
cell3-state1 has 4 keys.
Note: Insert 0 if no data available.
input
key states cell
key1 state1 cell1
key1 state2 cell1
key1 ... (21 Replies)
Hi
I am having a file which is required to be presented in the under-noted output form. Please suggest.
Input:
Kapil:
apple 4
banana 6
cherry 0
Manoj:
apple 13
banana
cheery 2
Output:
apple banana cherry
Kapil: 4 6 0
Manoj: 13 2
Thanks in... (4 Replies)
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Dear Unixers,
I'm having some difficulty in converting an n x m data matrix into a dataset of 3 columns and nxm rows. As an example I want to convert this dataset
2 3 4 5
2 0.0 0.0 0.1 0.1
6 -0.3 2.0 0.0 0.3
7 -0.6 -1.1 0.5 0.3
9 -0.9 -4.1 -0.7 0.5
... (2 Replies)
How can i convert the below data to a simpler format :-
cat tabular.txt
User 1 Details :-
First Name = Tom
Middle Name =
Last Name = Hanks
Age = 40
Address =
User 2 details :-
First Name = Mike
Middle Name =
Last Name = Tyson
Age = 50
Address = (2 Replies)
Please provide script/commands to convert text file to HTML tabular format.
No need of styles and colours, just output and a heading in table is required.
Output file will be send via email and will be seen from outlook.
(script required without using awk).
output file content: (sar... (7 Replies)
Discussion started by: Veera_V
7 Replies
LEARN ABOUT DEBIAN
proc::processtable
ProcessTable(3pm) User Contributed Perl Documentation ProcessTable(3pm)NAME
Proc::ProcessTable - Perl extension to access the unix process table
SYNOPSIS
use Proc::ProcessTable;
$p = new Proc::ProcessTable( 'cache_ttys' => 1 );
@fields = $p->fields;
$ref = $p->table;
DESCRIPTION
Perl interface to the unix process table.
METHODS
new Creates a new ProcessTable object. The constructor can take the following flags:
enable_ttys -- causes the constructor to use the tty determination code, which is the default behavior. Setting this to 0 diables this
code, thus preventing the module from traversing the device tree, which on some systems, can be quite large and/or contain invalid
device paths (for example, Solaris does not clean up invalid device entries when disks are swapped). If this is specified with
cache_ttys, a warning is generated and the cache_ttys is overridden to be false.
cache_ttys -- causes the constructor to look for and use a file that caches a mapping of tty names to device numbers, and to create the
file if it doesn't exist (this file is /tmp/TTYDEVS by default). This feature requires the Storable module.
fields
Returns a list of the field names supported by the module on the current architecture.
table
Reads the process table and returns a reference to an array of Proc::ProcessTable::Process objects. Attributes of a process object are
returned by accessors named for the attribute; for example, to get the uid of a process just do:
$process->uid
The priority and pgrp methods also allow values to be set, since these are supported directly by internal perl functions.
EXAMPLES
# A cheap and sleazy version of ps
use Proc::ProcessTable;
$FORMAT = "%-6s %-10s %-8s %-24s %s
";
$t = new Proc::ProcessTable;
printf($FORMAT, "PID", "TTY", "STAT", "START", "COMMAND");
foreach $p ( @{$t->table} ){
printf($FORMAT,
$p->pid,
$p->ttydev,
$p->state,
scalar(localtime($p->start)),
$p->cmndline);
}
# Dump all the information in the current process table
use Proc::ProcessTable;
$t = new Proc::ProcessTable;
foreach $p (@{$t->table}) {
print "--------------------------------
";
foreach $f ($t->fields){
print $f, ": ", $p->{$f}, "
";
}
}
CAVEATS
Please see the file README in the distribution for a list of supported operating systems. Please see the file PORTING for information on
how to help make this work on your OS.
AUTHOR
D. Urist, durist@frii.com
SEE ALSO
Proc::ProcessTable::Process.pm, perl(1).
perl v5.14.2 2013-02-10 ProcessTable(3pm)