Hi,
I need to insert a line into a file underneath an existing line in the file, but am unsure as to the syntax. I'm pretty sure sed can be used though, although any ideas are more than welcome. For example:
File
----
Line 1
Line 2
Line 3
Line 4
Line 6
I need to say: Insert "Line 5"... (1 Reply)
Could someone tell me how to replace varibles using SED inside Korn Shell?
e.g. I have a ksh file program.ksh below:
------------------------------------
#!/bin/ksh
sed -n '/ABC/p' $1 > output.txt
if ]
then
status=new
elif ]
then
status=old
fi
sed -n '/$status/p' $1... (5 Replies)
Hi All,
i have one file and in that i have to read each line and do some replacement.
its is not fixed the number or column always be same it can be less also
exm
a;b;c;d;e;f (line)
i have to do something like
In the line
If c is present
then
go to end of line and append ';date'
else... (9 Replies)
Hi,
I have a file in a form of
jkkhjjk1:!:jkhdjkhjkh2:!:kljkljkljklj3:!:kljsdj4
kljlkfljf5:!:kjljljlj6:!:jhjkhjkh7
I am trying to use sed command such that everytime it find ":!:" it will removes it and print remaining of the line on the new line
Output that I need will look like following... (8 Replies)
Hi,
I have the following texts :
#1#http://www.google.com#2#Google#3#
#1#http://www.aol.com#2#AOL#3#
I need a bash script which extracts the text between the markers (marks are #1#,#2#,#3#).
I also need that text in variables ($URL and $DESCRIPT will be fine) so I can later use it to... (3 Replies)
I am trying to retrieve part of a line from /boot/grub/menu.lst
The line is :
gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxblue/boot/message
I have figured out how to get this line into a file by itself.
sed '/gfxmenu/ !d' /boot/grub/menu.lst > /tmp/menu.lst.pcl_tc
What I need to... (2 Replies)
Hi All ,
I have a input file which has set of lines like this ::
cat a.txt
unix1 djkdfkjdkkdfkdjfdfkjd 09191091 unix@unix.com <2008-23-07>
unix 2 dfdfdfdfdfdfdfdfdfd
unix3 dfldfljdflkjdfldfkljdfldjfl 0565606 unix1@unix.com <2008-10-09>
unix4 dfdlfndfldflnlffddfd
for some... (4 Replies)
Hi,
I would like to process one file which looks like this :
09-04-16-17:11:53 -> count 1
NAME CHAN QID NMSGS NBYTES MAXBYTES P/T
W_DEALNUM 105 123508770 1 10 14 P
W_APPSTAT 106 123508771 1 12 35 P... (8 Replies)
Hello!
I have a "problem" with sed... In a log, I'm wondering how to have the name of the application when "INCIDENT" is in the file...
The name of the application is before "INCIDENT".
For this example, The result should be "SPVP0005"
thanks for your help! (7 Replies)
I want to search texts between first occurence of the matching pattern and replace it with some other text.pls advice what can be done. I searched alot, i could not find anything relevant.
Ex my input is as follows:
red
yellow
grey
white
blue
red
pink
violet
white
I want to search... (9 Replies)
Discussion started by: sangitajc
9 Replies
LEARN ABOUT DEBIAN
ocf_heartbeat_mysql-proxy
OCF_HEARTBEAT_MYSQL() OCF_HEARTBEAT_MYSQL()
NAME
ocf_heartbeat_mysql-proxy - Manages a MySQL Proxy daemon
SYNOPSIS
mysql-proxy [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
This script manages MySQL Proxy as an OCF resource in a high-availability setup. Tested with MySQL Proxy 0.7.0 on Debian 5.0.
SUPPORTED PARAMETERS
binary
Full path to the MySQL Proxy binary. For example, "/usr/sbin/mysql-proxy". (optional, string, default /usr/sbin/mysql-proxy)
defaults_file
Full path to a MySQL Proxy configuration file. For example, "/etc/mysql-proxy.conf". (unique, optional, string, no default)
proxy_backend_addresses
Address:port of the remote backend-servers (default: 127.0.0.1:3306). (optional, string, default 127.0.0.1:3306)
proxy_read_only_backend_addresses
Address:port of the remote (read only) slave-server (default: ). (optional, string, default 127.0.0.1:3306)
proxy_address
Listening address:port of the proxy-server (default: :4040). You can also specify a socket like "/tmp/mysql-proxy.sock". (optional,
string, default :4040)
log_level
Log all messages of level (error|warning|info|message|debug|) or higher. An empty value disables logging. (optional, string, no
default)
keepalive
Try to restart the proxy if it crashed (default: ). Valid values: true or false. An empty value equals "false". (optional, string, no
default)
admin_address
Listening address:port of the admin-server (default: 127.0.0.1:4041). (optional, string, default 127.0.0.1:4041)
admin_username
Username to allow to log in (default: ). (optional, string, no default)
admin_password
Password to allow to log in (default: ). (optional, string, no default)
admin_lua_script
Script to execute by the admin plugin. (optional, string, no default)
parameters
The MySQL Proxy daemon may be called with additional parameters. Specify any of them here. (optional, string, no default)
pidfile
PID file (unique, optional, string, default /var/run/resource-agents/mysql-proxy-default.pid)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 30s.
stop
Stops the resource. Suggested minimum timeout: 30s.
reload
Suggested minimum timeout: 30s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 60s.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 30s.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.
EXAMPLE
The following is an example configuration for a mysql-proxy resource using the crm(8) shell:
primitive p_mysql-proxy ocf:heartbeat:mysql-proxy
op monitor depth="0" timeout="20s" interval="60s"
SEE ALSO
http://www.linux-ha.org/wiki/mysql-proxy_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
OCF_HEARTBEAT_MYSQL()