I believe your problem is this line:
You are over writing it everytime you execute the script. You would have to change it to this:
Of course you will get your headings multiple times. Not sure how to solve that.
Hi All,
I am writing a Perl script such that the output from "perl myscript.pl file1" to be appended to another file name called file2.
I tried out with the below code but couldn't work.
Can any expert give me some advice?
open(OUTPUT, 'perl myscript.pl file1 |');
close OUTPUT;... (7 Replies)
I am running a command which has a parameter that outputs the results to a file each time it is run.
Here is the command:
--fullresult=true > importlog.xml
Can I add the output to the file rather than creating a new one which overwrites the existing one?
If not can I make the file name... (2 Replies)
I've setup a cron job that greps a file every five minutes and then writes (appends) the grep output/result to another file:
grep "monkey" zoo.log | tail -1 >> cron-zoo-log
Is there any way I can add the date and time (timestamp) to the cron-zoo-log file for each time a new line was added?
... (12 Replies)
Hi All, can you help me with this:
grep XXX dir/*.txt|wc -l > newfile.txt - this put the results in the newfile.txt, but I want to add another column in the newfile.txt, string 'YYYYY', separated somehow, which corresponds on the grep results?
For example grep will grep XXX dir/*.txt|wc -l >... (5 Replies)
I'm trying to output the contents of the infile to the outfile using Append.
I will want to use append but the syntax doesn't seem to be working !
Input file (called a.txt) contains this:
a
a
a
b
b
b
I'm running shell script (called k.sh) from Unix command-line like this:
./k.sh .... (1 Reply)
Noob question!
I know almost nothing so far, and I'm trying to teach myself from books, on a typical command line without using scripts how would I append output from a sort to a file in a completely different directory?
example:
If I'm sorting a file in my documents directory but I... (2 Replies)
Hi All,
I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file.
Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file.
script :... (3 Replies)
Hello,
i'm trying to force a command to read every second from an interface
watch -n1 (command) /dev/x | cat >> output
but it continue to overwrite the file, without append the content
Thanks and advace for help as usual
regards (4 Replies)
Experts,
I am writing a script and able to write only small piece of code and not able to collect logic to complete this task.
In input file have to look for name like like this (BGL_HSR_901_1AG_A_CR9KTR10) before sh iss neors. Record this (BGL_HSR_901_1AG_A_CR9KTR10) in csv file
Now have to... (0 Replies)
Discussion started by: as7951
0 Replies
LEARN ABOUT SUSE
ocf_heartbeat_proftpd
OCF_HEARTBEAT_PROFTP(7) OCF resource agents OCF_HEARTBEAT_PROFTP(7)NAME
ocf_heartbeat_proftpd - OCF Resource Agent compliant FTP script.
SYNOPSIS
proftpd [start | stop | monitor | monitor | validate-all | meta-data]
DESCRIPTION
This script manages Proftpd in an Active-Passive setup
SUPPORTED PARAMETERS
binary
The Proftpd binary (optional, string, default /usr/sbin/proftpd)
conffile
The Proftpd configuration file name with full path. For example, "/etc/proftpd.conf" (optional, string, default /etc/proftpd.conf)
pidfile
The Proftpd PID file. The location of the PID file is configured in the Proftpd configuration file. (optional, string, default
/var/run/proftpd.pid)
curl_binary
The absolut path to the curl binary for monitoring with OCF_CHECK_LEVEL greater zero. (optional, string, default /usr/bin/curl)
curl_url
The URL which is checked by curl with OCF_CHECK_LEVEL greater zero. (optional, string, default ftp://localhost/)
test_user
The name of the ftp user for monitoring with OCF_CHECK_LEVEL greater zero. (optional, string, default test)
test_pass
The password of the ftp user for monitoring with OCF_CHECK_LEVEL greater zero. (optional, string, no default)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 20s.
stop
Stops the resource. Suggested minimum timeout: 20s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 120s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 20s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a proftpd resource using the crm(8) shell:
primitive example_proftpd ocf:heartbeat:proftpd
op monitor depth="0" timeout="20s" interval="60s"
op monitor depth="10" timeout="20s" interval="120s"
SEE ALSO
http://www.linux-ha.org/wiki/proftpd_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_PROFTP(7)