09-22-2007
I am very sorry Perderabo... i didnot mean that way...
I thought u made a typo error because
when i run with E i get
[tofps8]/home/tofps8/SCRIPTS> cat datae
A 0
B 0
C 0
D 0
E A
E B
E C
Z H
Z D
F E
G E
H E
I G
[tofps8]/home/tofps8/SCRIPTS> ./level datae
A 3 1
B 2 1
C 1 1
D 6 1
E 4 1
E 4 1
E 4 1
F 10 1
G 8 1
H 5 1
I 9 1
Z 7 1
Z 7 1
[tofps8]/home/tofps8/SCRIPTS> cat level
#! /usr/bin/ksh
sort $1 > temp1
tsort temp1 | sed '$d' | nl | sort -nr | cut -f2 | nl | awk '{print $2, $1}' | sort | join temp1 - | sort -k 3n | awk '{print $1,$2}' |\
awk '{r[NR]=$0 ; k[NR]=$1 ; if(v[$1]<1+v[$2]) v[$1]=1+v[$2] } END { for (n=1; n<=NR; n++) print r[n] , v[k[n]]}'
exit 0
and for data with P
[tofps8]/home/tofps8/SCRIPTS> ./level datap
A 3 1
B 2 1
C 1 1
D 6 1
F 10 1
G 8 1
H 5 1
I 9 1
P 4 1
P 4 1
P 4 1
Z 7 1
Z 7 1
i just copy pasted what u gave...
I use AIX 5.3... any issue in it..
Last edited by pbsrinivas; 09-22-2007 at 09:10 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a requirement where in I have an input as follows:-
input=1-4,6,8-10,12-15
I need to explode this range into an output file as follows:-
1
2
3
4
6
8
9
10
12
13
14
15
My input may vary like 1,5-9,11-13,15-17....... (3 Replies)
Discussion started by: rony_daniel
3 Replies
2. Shell Programming and Scripting
hello,
does anybody can give me a hint on how to generate a lot of numbers which are not identically via scripting etc? (7 Replies)
Discussion started by: xrays
7 Replies
3. Shell Programming and Scripting
I have tried to make this script to generate:
000
001
002
...
997
998
999
i=0
while
do
if
then
echo "00"$i
else if &&
then
echo "0"$i (5 Replies)
Discussion started by: locoroco
5 Replies
4. Programming
hi guys,
I am writing a c program that generates a two dimensional array to make matrix and a vector of random numbers and perform multiplication. I can't figure out whats wrong with my code. It generates a matrix of random numbers but all the numbers in the vector array is same and so is the... (2 Replies)
Discussion started by: saboture88
2 Replies
5. Shell Programming and Scripting
Hello All,
Could you please help with this.
This is what I have:
506234.222 2
506234.222 2
506234.222 2
506234.222 2
508212.200 2
508212.200 2
333456.111 2
333456.111 2
333456.111 2
333456.111 2
But this is what I want:
506234.222 1
506234.222 2
506234.222 2
506234.222 3 (5 Replies)
Discussion started by: canimba
5 Replies
6. Shell Programming and Scripting
Hi Unix Gurus,
I have a requirement to generate positive random 16 and 13 digit numbers.
Here is the script I have so far.....
number=$RANDOM$RANDOM$RANDOM$RANDOM;
let "number %= 10000000000000";
echo $number
But sometimes it is generating negative numbers and also 15 digit... (8 Replies)
Discussion started by: scorpioraghu
8 Replies
7. Shell Programming and Scripting
i want to generate a random number through a script, and even if anyone reads the script, they wont be able to figure out what the random number is. only the person who setup the script would know it.
something like this could work: random
the full thread is here:
... (13 Replies)
Discussion started by: SkySmart
13 Replies
8. Shell Programming and Scripting
How do I generate line numbers in Vi?
I have this:
,'04-90020-039N','61423','2GDV00039-0002', SYSDATE);
,'04-90020-040D','61423','2GDV00046-0001', SYSDATE);
,'04-90020-041N','61423','2GDV00038-0002', SYSDATE);
,'04-90020-043D','61423','2GDV00047-0001', SYSDATE);... (3 Replies)
Discussion started by: djehresmann
3 Replies
9. Shell Programming and Scripting
Hi all, i need advise from all experts here.
when i use command below to print number in 10 character
printf "%010d\n" {0..999}
it will give me output nicely
starts from
0000000000
untillllllllllll
0000000994
0000000995
0000000996
0000000997
0000000998
0000000999
However. when i... (6 Replies)
Discussion started by: jason6247
6 Replies
10. Shell Programming and Scripting
I need awk script to generate part number sequencing based on data in multiple columns like below
Input File
---------
Col A|Col B|Col C|
1|a|x|
2|b|y|
|c|z|
| |m|
| |n|
And out put should be like
1ax
1ay
1az
1am
1an
1bx
1by (6 Replies)
Discussion started by: aramacha
6 Replies
LEARN ABOUT DEBIAN
pegasus-statistics
PEGASUS-STATISTICS(1) PEGASUS-STATISTICS(1)
NAME
pegasus-statistics - A tool to generate statistics about the workflow run.
SYNOPSIS
pegasus-statistics [-h|--help]
[-o|--output dir]
[-c|--conf propfile]
[-p|--statistics-level level]
[-t|--time-filter filter]
[-i|--ignore-db-inconsistency]
[-v|--verbose]
[-q|--quiet]
[submitdir]
DESCRIPTION
pegasus-statistics generates statistics about the workflow run like total jobs/tasks/sub workflows ran , how many succeeded/failed etc. It
generates job instance statistics like run time, condor queue delay etc. It generates invocation statistics information grouped by
transformation name. It also generates job instance and invocation statistics information grouped by time and host.
OPTIONS
-h, --help
Prints a usage summary with all the available command-line options.
-o dir, --output dir
Writes the output to the given directory.
-c propfile, --conf propfile
The properties file to use. This option overrides all other property files.
-s level, --statistics-level level
Specifies the statistics information to generate. Valid levels are: all, summary, wf_stats, jb_stats, tf_stats, and ti_stats. Default
is summary. The output generated by pegasus-statistics is based on the the level set:
o all: generates all the statistics information.
o summary: generates the workflow statistics summary. In the case of a hierarchical workflow the summary is across all sub
workflows.
o wf_stats: generates the workflow statistics information of each individual workflow. In case of a hierarchical workflow the
workflow statistics are created for each sub workflow.
o jb_stats: generates the job statistics information of each individual workflow. In case of hierarchical workflow the job
statistics is created for each sub workflows.
o tf_stats: generates the invocation statistics information of each individual workflow grouped by transformation name .In case of
hierarchical workflow the transformation statistics is created for each sub workflows.
o ti_stats: generates the job instance and invocation statistics like total count and runtime grouped by time and host.
-t filter, --time-filter filter
Specifies the time filter to group the time statistics. Valid filter values are: month, week, day, hour. Default is day.
-i, --ignore-db-inconsistency
Turn off the the check for database consistency.
-v, --verbose
Increases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to
INFO. If this option is repeated, the log level will be changed to DEBUG.
-q, --quiet
Decreases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to
ERROR.
EXAMPLE
Runs pegasus-statistics and writes the output to the given directory:
$ pegasus-statistics -o /scratch/statistics /scratch/grid-setup/run0001
AUTHORS
Prasanth Thomas
Pegasus Team http://pegasus.isi.edu
05/24/2012 PEGASUS-STATISTICS(1)