Hi ,
Can some one help in appending the file name to all the rows in .csv files the current work is like this.
This is adding a new line for file name,
I need to append file name to all lines in .csv
for i in `ls $filename*.csv`
do
echo "$i" > ./tmpfile
cat "$i" >> ./tmpfile
mv... (3 Replies)
Hi,
We have Multiple source files which has some data, I need a K shell script which will append number '1' as the last character to all the lines of the first file and then increments the value and appends '2' to all the lines to the next file and so on.
For Example
Incoming file 1
... (2 Replies)
Hello All,
Could you please provide the solution to my following query
I have some files in my directory. I need to amend the total number of
lines to be added in the starting
line of each file.
For example, please refer the content of the file "file.dat" below.
\h:\w #> cat file.dat... (1 Reply)
There are 10 files present which have Ctlr-M characters appended to each line of all files.
I have a unix script which processes the files in a loop.
And there is an inner loop which processes each line in the file concerned.
#inputFile is a variable which has the file name of the input... (2 Replies)
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958(which is hostname) only,... (5 Replies)
I need to extract the data from oracle table and written the below code.
But it is not working.There is some problem with the query and output is shown is No rows selected" . If I run the same query from sql developer there is my required output.
And if I run the shell script with simple sql... (7 Replies)
i have an existing script that is used to send an e-mail containing the alrams that appear on the server.
But i need to create a daily log file containing all the alarms that was send that day.
i tired to add at the and of the script a command, echo command but for some reason the file was... (1 Reply)
I want to make a script to read row by row and find its length. If the length is less than my required length then i hav to append spaces to that paritucular row. Each row contains special characters, spaces, etc.
For example my file contains ,
12345 abcdef
234 abcde
89012 abcdefgh
... (10 Replies)
Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames?
AAAL_555A_ORANGE1_F190404.TXT
AAAL_555A_ORANGE2_F190404.TXT
AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
I have a file as below
Emp1|FirstName|MiddleName|LastName|Address|Pincode|PhoneNumber
1234|FirstName1|MiddleName2|LastName3| Add1 || ADD2|123|000000000
2345|FirstName2|MiddleName3|LastName4|
Add1 || ADD2|
234|000000000
OUTPUT :
... (1 Reply)
Discussion started by: styris
1 Replies
LEARN ABOUT PHP
numfmt_set_pattern
NUMFMT_SET_PATTERN(3) 1 NUMFMT_SET_PATTERN(3)NumberFormatter::setPattern - Set formatter pattern
Object oriented style
SYNOPSIS
public bool NumberFormatter::setPattern (string $pattern)
DESCRIPTION
Procedural style
bool numfmt_set_pattern (NumberFormatter $fmt, string $pattern)
Set the pattern used by the formatter. Can not be used on a rule-based formatter.
PARAMETERS
o $fmt
-NumberFormatter object.
o $pattern
- Pattern in syntax described in ICU DecimalFormat documentation.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
numfmt_set_pattern(3) example
<?php
$fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL );
echo "Pattern: ".numfmt_get_pattern($fmt)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
numfmt_set_pattern($fmt, "#0.# kg");
echo "Pattern: ".numfmt_get_pattern($fmt)."
";
echo numfmt_format($fmt, 1234567.891234567890000)."
";
?>
Example #2
OO example
<?php
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL );
echo "Pattern: ".$fmt->getPattern()."
";
echo $fmt->format(1234567.891234567890000)."
";
$fmt->setPattern("#0.# kg");
echo "Pattern: ".$fmt->getPattern()."
";
echo $fmt->format(1234567.891234567890000)."
";
?>
The above example will output:
Pattern: #,##0.###
1.234.567,891
Pattern: #0.# kg
1234567,9 kg
SEE ALSO numfmt_get_error_code(3), numfmt_create(3), numfmt_get_pattern(3).
PHP Documentation Group NUMFMT_SET_PATTERN(3)