12-04-2011
Hi Balajesuri,
Thank you very much
your codes solved my problem. But I do not know Perl, I want to ask two more questions;
1)
You defined as a constant value of the first column value.
your code
printf "3 %02d ", $x[1];
how can I get this value from the source file first column?
2)
I will save your code in a new file and, I want to make an executable script. In this case, I would like to pass the source file name as command line argument, how do I do?
your code
open I, "< input";
Thanks again for your reply.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
If I want to read user input and want to validate if it is a numeric number in some range of 1-100 what would be the best way?
Sabina (5 Replies)
Discussion started by: sabina
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
My requirement is I have an input file with a continuous series from 10000 to 99999. I have some numbers missing from those series. I want a output file which produces those missing numbers.
Eg: 10002, 99999 are missing from the series then the output file should contain those... (4 Replies)
Discussion started by: rakeshbharadwaj
4 Replies
3. Shell Programming and Scripting
Hi All.
I have a file that has an ID Number field....some of the ID Numbers are actual SSNs. ...does anyone know the range that SSNs may be...this is what I have found so far poking around SSN info sites....
greater than 001-01-0000 and less than 770-00-0000. Does anyone know this to be... (1 Reply)
Discussion started by: lyoncc
1 Replies
4. Shell Programming and Scripting
Hi Guys,
Can someone give me a simple script that can extract the numbers in between numbers from start to end. As shown below, it start from 100 to 110 and revealed the numbers in between.
INPUT:
100 - 110
DESIRED OUTPUT:
100
101
102
103
104
105
106
107 (6 Replies)
Discussion started by: pinpe
6 Replies
5. Shell Programming and Scripting
Is there a way to create a loop that will output number starting from 0.1 to 10.0
0.1
0.2
0.3
0.4
0.5
..
...
10.0
This is what i tried.
for i in {1..50}; do printf -v i '%02d' $i ; echo "$i"; done
That will print
01
02
03
..
..
50 (9 Replies)
Discussion started by: vietrice
9 Replies
6. Shell Programming and Scripting
Is it possible to test against a varible within a ranges in a if statement.
ex.
if ];then
echo "not in range"
else
echo "number within range"
fi (8 Replies)
Discussion started by: leemalloy
8 Replies
7. Shell Programming and Scripting
Hi
I want to get all numbers if number range is given as input.
Eg:
INPUT FILE
100-105
107
108-112
OUTPUT REQUIRED:
100 101 102 103 104 105
107
108 109 110 111 112
How can I do it using shell? :confused:
Thanks in advance. (11 Replies)
Discussion started by: dashing201
11 Replies
8. Shell Programming and Scripting
Hi there I am trying to generate a random number between 40 and 70 using the shell here is my code so far and it keeps going above 70. all help much appreciated!
comp=$(( RANDOM%70+40 ))
echo $comp (4 Replies)
Discussion started by: faintingquiche
4 Replies
9. Shell Programming and Scripting
I have 100k data like this bellow , i want to group data to range
171
172
173
174
175
176
179
182
183
187
188
189
1900
1901
1903
1904
1905
1906 (10 Replies)
Discussion started by: before4
10 Replies
LEARN ABOUT DEBIAN
chart::clicker::data::series
Chart::Clicker::Data::Series(3pm) User Contributed Perl Documentation Chart::Clicker::Data::Series(3pm)
NAME
Chart::Clicker::Data::Series - A series of key, value pairs representing chart data
VERSION
version 2.83
SYNOPSIS
use Chart::Clicker::Data::Series;
my @keys = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
my @values = (42, 25, 86, 23, 2, 19, 103, 12, 54, 9);
my $series = Chart::Clicker::Data::Series->new({
keys => @keys,
value => @values
});
# Alternately, if you prefer
my $series2 = Chart::Clicker::Data::Series->new({
1 => 42,
2 => 25,
3 => 85,
4 => 23,
5 => 2,
6 => 19,
7 => 102,
8 => 12,
9 => 54,
10 => 9
});
DESCRIPTION
Chart::Clicker::Data::Series represents a series of values to be charted.
Despite the name (keys and values) it is expected that all keys and values will be numeric. Values is pretty obvious, but it is important
that keys also be numeric, as otherwise we'd have no idea how to order the data.
If you want to use text labels for your domain's see Chart::Clicker::Axis's tick_labels method.
ATTRIBUTES
keys
Set/Get the keys for this series.
add_to_keys
Adds a key to this series.
name
Set/Get the name for this Series
range
Returns the range for this series.
values
Set/Get the values for this series.
METHODS
key_count
Get the count of keys in this series.
add_to_values
Add a value to this series.
value_count
Get the count of values in this series.
add_pair ($key, $value)
Convenience method to add a single key and a single value to the series.
get_value_for_key ($key)
Returns the value associated with the specified key. This is necessary because not all series will have values for every key.
AUTHOR
Cory G Watson <gphat@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Cold Hard Code, LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-22 Chart::Clicker::Data::Series(3pm)