Hi everybody
I have some problems with PERL programming.
I have a file with two columns, both with numeric values.
I have to extract the values > 50 from the 2nd columns and sum them among them.
The I have to sum the respective values in the first column on the same line and, at the end, I... (6 Replies)
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Hi,
I have a table in unix from which i want to read the contents line by line, then filter out the values from 6th column one by one and compare it a fixed value.
How to do this? (7 Replies)
Hi all !
If there is only one single value in a column (e.g. column 1 below), then return this value in the same output column.
If there are several values in the same column (e.g. column 2 below), then return the different values separated by "," in the output.
pipe-separated input:
... (11 Replies)
Dear Unix experts,
I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values.
For example, my input file looks like -
comp275_c0_seq2 73... (7 Replies)
Friends,
I'm trying to do below in ksh script, while requesting user to provide src_db and dest_db values
1. Extract src_db and dest_db Oracle home from oratab file
2. Don't find db if it starts with comment (#)
3. Compare both values
4. Message success or exit with error if they don't... (0 Replies)
Input File:-
COLUMN1 COLUMN2 COLUMN3 COLUMN4 COLUMN5 COLUMN6 SMS Email AO Mail Post N Cell
VEGE Potato E W 396 12 0 384 0 0 0 0 0
VEGE Onion S W 17 0 17 0 0 0 0 0 0
FRUIT APPLE N W 549 61 0 0 0 0 0 488 0
FRUIT APPLE SE W 291 14 239 38 0 10 0 0 0
FRUIT APPLE EAMS W 397 32 309 56 309 309 0... (27 Replies)
Discussion started by: Nina2910
27 Replies
LEARN ABOUT PHP
locale_lookup
LOCALE_LOOKUP(3) 1 LOCALE_LOOKUP(3)Locale::lookup - Searches the language tag list for the best match to the language
Object oriented style
SYNOPSIS
publicstatic string Locale::lookup (array $langtag, string $locale, [bool $canonicalize = false], [string $default])
DESCRIPTION
Procedural style
string locale_lookup (array $langtag, string $locale, [bool $canonicalize = false], [string $default])
Searches the items in $langtag for the best match to the language range specified in $locale according to RFC 4647's lookup algorithm.
PARAMETERS
o $langtag
- An array containing a list of language tags to compare to $locale. Maximum 100 items allowed.
o $locale
- The locale to use as the language range when matching.
o $canonicalize
- If true, the arguments will be converted to canonical form before matching.
o $default
- The locale to use if no match is found.
RETURN VALUES
The closest matching language tag or default value.
EXAMPLES
Example #1
locale_lookup(3) example
<?php
$arr = array(
'de-DEVA',
'de-DE-1996',
'de',
'de-De'
);
echo locale_lookup($arr, 'de-DE-1996-x-prv1-prv2', true, 'en_US');
?>
Example #2
OO example
<?php
$arr = array(
'de-DEVA',
'de-DE-1996',
'de',
'de-De'
);
echo Locale::lookup($arr, 'de-DE-1996-x-prv1-prv2', true, 'en_US');
?>
The above example will output:
de_de_1996
SEE ALSO locale_filter_matches(3).
PHP Documentation Group LOCALE_LOOKUP(3)