I have one file of numbers
4
5
2
...
And another file of strings
aaaaa bbbbb
ccccc ddddd
eeeee ffffff
...
I'd like to print the stings from each line in reverse order with some decoration the number of times listed in the first file
such as:
Yeah bbbbb aaaaa
Yeah bbbbb aaaaa (5 Replies)
I've created an awk script that handles a varying number of search strings handed to it as command line parameters ($1 $2 etc). There may be 1, or 2 or 3 or more. A simplified version of the script is:
awk -v TYP="$1 $2 $3 $4 $5 $6" '
BEGIN {
CTYP = split (TYP,TYPP," ")
}
... (2 Replies)
Hi all
I have a variable called "variable" and is of the form
variable ="AAA BBB CCC DDD" {basically it has values separated by spaces}
What is the simplest way to check if "variable" has more that one value in its list?
Thanks. (9 Replies)
Hello,
I wrote a script that does lot of things, and I would like to change the format of a number but without printing it now (so I don't want to use printf as it will print the value immediately).
Schematically here is what I have:
awk 'BEGIN{number=0.01234567}
$1==$2{$3=number}... (5 Replies)
People, I need your help with making a script which will
1. take as an input the number of lines, smth like this:
((RUBROBACTER_1_PE1288
(((SALINISPORA_1_PE1863
SALINISPORA_1_PE1828)100
((NOCARDIOIDES_2_PE2419
PROPIONIBACTERIUM_1_PE1395)96
((((((((CORYNEBACTERIUM_1_PE1119... (3 Replies)
Hi,
I have the following text in a file:
ISA*00* *00* *ZZ*ENS_EDI *ZZ*GATE0215 *110106*2244*U*00401*006224402*1*P*>~
GS*HP*ENS_EDI*GATE0215*20110106*2244*6224402*X*004010X091A1~
ST*835*00006~... (2 Replies)
Hello all,
I have a file with column header which looks like this.
C1 C2 C3
A A G
T T A
G C CI want to make columnwise (and bitwise) comparison of strings and calculate the number of matches.
So the number of matches between C1 and C2 will be comparing ATG and ATC.
Here there are... (5 Replies)
Hi,
I have a text file as shown below. I would like to count the unique number of connections of each person in the first and second column. Third column is the ID numbers of first column persons and fourth column is the ID numbers of second column persons.
susan ali 156 294... (7 Replies)
I have 500 text files in a folder. The data of the text files are shown below.
USA Germany 23-12
USA Germany 23-12
USA Germany 23-12
France Germany 15-12
France Germany 15-12
France Italy 25-50
China China 30-32
China China 30-32
I would... (1 Reply)
Discussion started by: sahith
1 Replies
LEARN ABOUT PHP
numfmt_set_symbol
NUMFMT_SET_SYMBOL(3) 1 NUMFMT_SET_SYMBOL(3)NumberFormatter::setSymbol - Set a symbol value
Object oriented style
SYNOPSIS
public bool NumberFormatter::setSymbol (int $attr, string $value)
DESCRIPTION
Procedural style
bool numfmt_set_symbol (NumberFormatter $fmt, int $attr, string $value)
Set a symbol associated with the formatter. The formatter uses symbols to represent the special locale-dependent characters in a number,
for example the percent sign. This API is not supported for rule-based formatters.
PARAMETERS
o $fmt
-NumberFormatter object.
o $attr
- Symbol specifier, one of the format symbol constants.
o $value
- Text for the symbol.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
numfmt_set_symbol(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
numfmt_set_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*");
echo "Sep: ".numfmt_get_symbol($fmt, NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo $fmt->format(1234567.891234567890000)."
";
$fmt->setSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, "*");
echo "Sep: ".$fmt->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL)."
";
echo $fmt->format(1234567.891234567890000)."
";
?>
The above example will output:
Sep: .
1.234.567,891
Sep: *
1*234*567,891
SEE ALSO numfmt_get_error_code(3), numfmt_get_symbol(3).
PHP Documentation Group NUMFMT_SET_SYMBOL(3)