HI all
I'm trying to write an awk script to print the min and max value in a range(s) contained in another file - the range values are in $2
EG
114,7964,1,y,y,n
114,7965,1,y,y,n
114,7966,1,y,y,n
114,7967,1,y,y,n
114,7969,1,y,y,n
114,7970,1,y,y,n
114,7971,1,y,y,n
114,7972,1,y,y,n... (3 Replies)
Hi,
I am trying to use AWK to do some editing and formating of large tables of numbers and I am having trouble getting it to work. For brevities sake, I won't show the whole table, but I have a sample set of code:
und$ awk '{($2+0) > 50;print $1}' temp
2000 147
2008 128
2002 100
1999 47... (2 Replies)
Hello all,
Let's say we have this file :
$ cat inputfile
2
3
4
7
8
11
15
16
17
I'm trying to make a script with awk which gives as output the following : (4 Replies)
Hi All,
Is there a way to save a range in variable for later printing?
for example write somthing like this:
awk '
/pattern1/,/pattern2/{f=range}
/pattern3/{print f}
'
I don't know excatly what "range" could be but is there a way to do this? (8 Replies)
Can I print the minimum and maximum values of values in first 4 columns ?
input
3038669 3038743 3037800 3038400 m101c
3218627 3218709 3217600 3219800 m290
.............
output
3037800 3038743 m101c
3217600 3219800 m290 (2 Replies)
Hi everyone, I'm a new member at the forum
I have a file like this: field 2 values are either 0 or negative. file test4:
100815 -20
118125 0
143616 0
154488 0
154488 0
154488 -6
196492 -5
196492 -9
196492 -7
27332 0
29397 0
I would like to print a... (1 Reply)
Hi everyone, I'm a new member at the forum I mistakenly posted this elsewhere too.
I have a file like this: field 2 values are either 0 or negative. file test4:
100815 -20
118125 0
143616 0
154488 0
154488 0
154488 -6
196492 -5
196492 -9
196492 -7
27332 0... (5 Replies)
From the below table I want to print highest value and lowest value using awk script.
aaa 55 66 96 77
ggg 22 96 77 23
ddd 74 58 18 3
kkk 45 89 47 92
zzz 34 58 89 92
Thanks, Green
edit by bakunin: it sure is not news to you that you should use CODE-tags, no? And that we do not want such... (3 Replies)
Dear Unix Gurus,
I have a text file with multiple columns, for example, see sample.txt below
0 1 301
1 4 250
2 6 140
3 2 610
7 1 180I want to find the maximum in, say, column 3, normalise all the values to this maximum value (to 4 decimal places) and spit everything into a new... (2 Replies)
Hi,
I have a text file, which I am trying to parse.
File contents:
BEG
Id Job1
Id Stage1
1
EN
Id Job2
Id Stage2
BEG
Id2 Job3
Id Stage4
2
EN
I have to process the data in this between every BEG and EN. so I am trying to restrict the range and inside every... (1 Reply)
Discussion started by: Kulasekar
1 Replies
LEARN ABOUT CENTOS
locale::codes::langvar
Locale::Codes::LangVar(3) User Contributed Perl Documentation Locale::Codes::LangVar(3)NAME
Locale::Codes::LangVar - standard codes for language variation identification
SYNOPSIS
use Locale::Codes::LangVar;
$lvar = code2langvar('acm'); # $lvar gets 'Mesopotamian Arabic'
$code = langvar2code('Mesopotamian Arabic'); # $code gets 'acm'
@codes = all_langvar_codes();
@names = all_langvar_names();
DESCRIPTION
The "Locale::Codes::LangVar" module provides access to standard codes used for identifying language variations, such as those as defined in
the IANA language registry.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language
registry codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying language variations. A code set may be specified using either a name, or
a constant that is automatically exported by this module.
For example, the two are equivalent:
$lvar = code2langvar('arevela','alpha');
$lvar = code2langvar('arevela',LOCALE_LANGVAR_ALPHA);
The codesets currently supported are:
alpha
This is the set of alphanumeric codes from the IANA language registry, such as 'arevela' for Eastern Armenian.
This code set is identified with the symbol "LOCALE_LANGVAR_ALPHA".
This is the default code set.
ROUTINES
code2langvar ( CODE [,CODESET] )
langvar2code ( NAME [,CODESET] )
langvar_code2code ( CODE ,CODESET ,CODESET2 )
all_langvar_codes ( [CODESET] )
all_langvar_names ( [CODESET] )
Locale::Codes::LangVar::rename_langvar ( CODE ,NEW_NAME [,CODESET] )
Locale::Codes::LangVar::add_langvar ( CODE ,NAME [,CODESET] )
Locale::Codes::LangVar::delete_langvar ( CODE [,CODESET] )
Locale::Codes::LangVar::add_langvar_alias ( NAME ,NEW_NAME )
Locale::Codes::LangVar::delete_langvar_alias ( NAME )
Locale::Codes::LangVar::rename_langvar_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangVar::add_langvar_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangVar::delete_langvar_code_alias ( CODE [,CODESET] )
These routines are all documented in the Locale::Codes::API man page.
SEE ALSO
Locale::Codes
The Locale-Codes distribution.
Locale::Codes::API
The list of functions supported by this module.
http://www.iana.org/assignments/language-subtag-registry
The IANA language subtag registry.
AUTHOR
See Locale::Codes for full author history.
Currently maintained by Sullivan Beck (sbeck@cpan.org).
COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.3 2013-04-12 Locale::Codes::LangVar(3)