I have a problem in my HP Unix system , it is briefly :
I have two files : Myfile and Script.sh :
Myfile contain this lines :
String1 string2 string3 string5
String1 string2 string3 string5
String1 string2 string3 string5 ... (2 Replies)
hi i would like to know whether i can delete a part of a file in C
for eg. if my file contained
1234567890
and i want to delete
456
so that it becomes
1237890
is there a way i can do this.
well, one way i can achieve this is by creating a new file, copy whatever i want, then delete the... (2 Replies)
I have a file containing records seperated by delimiter '|'.A record is contained on 2 or 3 lines. Now I need a shell script which could write all records with in two '|' character in one line.....for example.....
|R1........................R1
R1..........................R1... (2 Replies)
Hi All,
I need to execute some commands on each line of a file.
How do i iterate thru each line of a file?
In detail:
First i will have to go to the first line of the file and execute a series of commands on it and then take the second line of the file, execute a series of steps and so... (2 Replies)
I have a line of more than 3000 bytes which will contain & as fields separator..I am using following awk command ..Its working but its not accepting the line more than 3000 bytes...Anyother alternate solution even in othe shell command also fine...
awk -F '&' '{for( i=1; i<=NF; i++ ) print $i}'... (2 Replies)
Hi,
I need to check if a parameter provided at the command line is equal to --.How can i do that ? Please help me.
Thanks and Regards,
Padmini (4 Replies)
Hi Experts,
I need one line script for the below requirement.
First it should check if a directory with todays date exist, and if not create it and move the PDF file to that directory.
thanks in advance!!! (2 Replies)
find pattern, delete line with pattern and 3 lines above and 8 lines below the pattern. The pattern is "isup". The entire record with starting tag <record> and ending tag </record> containing the pattern is to be deleted and the rest to be retained.
<record>
... (4 Replies)
Thanks a lot for the code and the explanation.
Now my final requirement.
I have uploaded 3 files as attachment. Please open the files in Editplus or any other text editor which keeps the formatting.
GMDCOM.27936.log.txt------I want to pick only Process request from this file.(Please check... (9 Replies)
Hi
I have a text file like below. THe content of the text will vary.
Entire text file have four consecutive lines followed with blank line.
I want to delete the occurrence of the two consicutive lines in the text file. I don't have pattern to match and delete. Just i need to delete all... (5 Replies)
Discussion started by: RJSKR28
5 Replies
LEARN ABOUT PHP
numfmt_set_attribute
NUMFMT_SET_ATTRIBUTE(3) 1 NUMFMT_SET_ATTRIBUTE(3)NumberFormatter::setAttribute - Set an attribute
Object oriented style
SYNOPSIS
public bool NumberFormatter::setAttribute (int $attr, int $value)
DESCRIPTION
Procedural style
bool numfmt_set_attribute (NumberFormatter $fmt, int $attr, int $value)
Set a numeric attribute associated with the formatter. An example of a numeric attribute is the number of integer digits the formatter
will produce.
PARAMETERS
o $fmt
-NumberFormatter object.
o $attr
- Attribute specifier - one of the numeric attribute constants.
o $value
- The attribute value.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
numfmt_set_attribute(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo "Digits: ".numfmt_get_attribute($fmt, NumberFormatter::MAX_FRACTION_DIGITS)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
numfmt_set_attribute($fmt, NumberFormatter::MAX_FRACTION_DIGITS, 2);
echo "Digits: ".numfmt_get_attribute($fmt, NumberFormatter::MAX_FRACTION_DIGITS)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo "Digits: ".$fmt->getAttribute(NumberFormatter::MAX_FRACTION_DIGITS)."
";
echo $fmt->format(1234567.891234567890000)."
";
$fmt->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 2);
echo "Digits: ".$fmt->getAttribute(NumberFormatter::MAX_FRACTION_DIGITS)."
";
echo $fmt->format(1234567.891234567890000)."
";
?>
The above example will output:
Digits: 3
1.234.567,891
Digits: 2
1.234.567,89
SEE ALSO numfmt_get_error_code(3), numfmt_get_attribute(3), numfmt_set_text_attribute(3).
PHP Documentation Group NUMFMT_SET_ATTRIBUTE(3)