I have a log file that ends in a ".xxx" where xxx are digits but I don't necessarily know what digits they are. The log file rotates automatically and is auto-incrementing - starting at .001.
So the example would be:
file-name.005
If the file ends in .005 and the log rotates, it logically... (2 Replies)
Hi guys,
I am not very experienced in writing ksh scripts and I am trying to write a piece of code that indicates if a given string contains only digits and no alphabet (upper or lower case). If i write it my way it would turn out to have a lot of comparisons.. :eek:
Thanks a lot in... (3 Replies)
Hi Friends
I have 2 solaris boxes and I need to check certain directories (on local filesystem and mounted nfs) to make sure that they match up on both boxes and to delete or move the other mismatches to elsewhere on the local filesystem.
I investigated for unix commands like rsync, and tree... (1 Reply)
hi all, im having problems. I need to change all number 10 in a text file to word form, or in short from 10->ten. the thing is number 10 including in dates such as 10/22/1997 or 03-10-2011 should not be changed. im having some trouble because the file contains numbers like "price range from... (11 Replies)
Hi,
I just need to check whether number of digits in a phone number is 10 or not. If I am not wrong regex will be: {9}
I have to use this inside nawk as this is a small portion of a big program.
nawk '
BEGIN { RS="";FS=";";
regex="{9}";
}
{
for (i=1;i<=NF;i++) {
if... (6 Replies)
Hi,
I have a text file with an array of numbers such as :
123 1 456 45 9817 1 45
I would like to replace the digit "1" in a text file with "A". So it looks like this:
123 A 456 45 9817 A 45
If I use sed 's/1/A/g', I get
A23 A 456 45 98A7 A 45
I... (3 Replies)
Hi All
I am new to this forum and also regex.
I am using bash scripting and have a file like this
"0012","efgh","12345678","adfdf", "36598745"
"87654321","hijk","lmno"
I want the ouput to be
12345678
36598745
87654321
Criteria like this
- number
- 8 carachters long
Please let... (21 Replies)
I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file
---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Hi Experts,
I am finding difficulty to get exact match:
file
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""
DHCP_ENABLE=0
INTERFACE_NAME="lan3:1"... (6 Replies)
Discussion started by: rveri
6 Replies
LEARN ABOUT PHP
numfmt_create
NUMFMT_CREATE(3) 1 NUMFMT_CREATE(3)NumberFormatter::create - Create a number formatter
Object oriented style (method)
SYNOPSIS
publicstatic NumberFormatter NumberFormatter::create (string $locale, int $style, [string $pattern])
DESCRIPTION
Procedural style
NumberFormatter numfmt_create (string $locale, int $style, [string $pattern])
Object oriented style (constructor): NumberFormatter::__construct (string $locale, int $style, [string $pattern])
Creates a number formatter.
PARAMETERS
o $locale
- Locale in which the number would be formatted (locale name, e.g. en_CA).
o $style
- Style of the formatting, one of the format style constants. If NumberFormatter::PATTERN_DECIMAL or NumberFormatter::PAT-
TERN_RULEBASED is passed then the number format is opened using the given pattern, which must conform to the syntax described in
ICU DecimalFormat documentation or ICU RuleBasedNumberFormat documentation, respectively.
o $pattern
- Pattern string if the chosen style requires a pattern.
RETURN VALUES
Returns NumberFormatter object or FALSE on error.
EXAMPLES
Example #1
numfmt_create(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo numfmt_format($fmt, 1234567.891234567890000)."
";
$fmt = numfmt_create( 'it', NumberFormatter::SPELLOUT );
echo numfmt_format($fmt, 1142)."
";
?>
Example #2
numfmt_create(3) example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo $fmt->format(1234567.891234567890000)."
";
$fmt = new NumberFormatter( 'it', NumberFormatter::SPELLOUT );
echo $fmt->format(1142)."
";
?>
The above example will output:
1.234.567,891
millicentoquarantadue
SEE ALSO numfmt_format(3), numfmt_parse(3).
PHP Documentation Group NUMFMT_CREATE(3)