I have a log file on our system which fills up with lines that have been timestamped, as follows....
03/03/2008 10:56:06:815] (ERROR) balance: continuing session to genapp02 : 18500
03/03/2008 10:56:06:820] (ERROR) balance: continuing session to genapp02 : 18500
03/03/2008 10:56:07:003]... (2 Replies)
The script below is a backup script I wrote.
It Tars and gzips files and move them to backup folder.
It appends the current date of action to the name of the .tar.gz file
echo “Taking Domain Backup...”
hostname
echo “Tarring internetprod”
sleep 2
cd /usr/web/bea/projects/domains
tar... (4 Replies)
Hello ,
Is there a way to delete lines from a file where data is continously appended to the file. I can use normal vi command ndd to remove n number of lines from the file, as the data is continously appended the line numbers doesnt work. (1 Reply)
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Hi guys I have a file that is filled with x,y values:
0.000000 0.00129578
0.000191 0.00272187
0.000381 0.0125676
0.000572 0.0120014
0.000763 0.00203461
0.000954 0.00682248
0.001144 0.00202773
0.001335 0.000840523
0.001526 0.00451419
....5MB of that
I wanted to know if there is a... (7 Replies)
How can we a shell script and pass date parameters .I have 3 files comming from Datastage with |" delimited
I need append 3 files as above: File1:
P0000|"47416954|"AU|"000|"INS|"0000|"|"20060601|"99991231|"|"|"|"|"01
File 2:... (2 Replies)
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>"
So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Hi I have one file which is containing about 5000 rows and 20 columns
I will just explain about my requirement here briefly with sample file, I have attached also, please help....me..
1 28.25 36.42
5 28.26 36.42
10 28.23 36.43
15 28.22 36.43
20 28.2 36.42
25... (6 Replies)
Hi Guys,
I have this task to monitor a linux box. I found a program that displays the parameters that I want and I wrote a little .sh to run that program and record output into a file.
The findings look promising but I would like to graph them.
My output (for every iteration) looks like... (3 Replies)
Discussion started by: DraxDomax
3 Replies
LEARN ABOUT PHP
vfprintf
VFPRINTF(3) 1 VFPRINTF(3)vfprintf - Write a formatted string to a streamSYNOPSIS
int vfprintf (resource $handle, string $format, array $args)
DESCRIPTION
Write a string produced according to $format to the stream resource specified by $handle.
Operates as fprintf(3) but accepts an array of arguments, rather than a variable number of arguments.
PARAMETERS
o $handle
-
o $format
- See sprintf(3) for a description of $format.
o $args
-
RETURN VALUES
Returns the length of the outputted string.
EXAMPLES
Example #1
vfprintf(3): zero-padded integers
<?php
if (!($fp = fopen('date.txt', 'w')))
return;
vfprintf($fp, "%04d-%02d-%02d", array($year, $month, $day));
// will write the formatted ISO date to date.txt
?>
SEE ALSO printf(3), sprintf(3), sscanf(3), fscanf(3), vsprintf(3), number_format(3).
PHP Documentation Group VFPRINTF(3)