04-28-2014
What have you tried so far? Give us the code that you have written and show us the error you are getting. We can not help you if we dont know where you are stuck at.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Actually i want to replace the word after a matched pattern.
For Ex:
lets say that i am reading a file line by line
while read line
do
echo $line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example :... (1 Reply)
Discussion started by: maxmave
1 Replies
2. Shell Programming and Scripting
Hi,
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
BEGIN {
$pattern or
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
Discussion started by: er_ashu
5 Replies
3. Shell Programming and Scripting
would like to print word between matched patterns using sed
for example :
create INDEX SCOTT.OR_PK ON table_name(....)
would like to print between SCOTT. and ON which is OR_PK
Please help me out
Thanks (4 Replies)
Discussion started by: jhonnyrip
4 Replies
4. Shell Programming and Scripting
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
5 Replies
5. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
6. Shell Programming and Scripting
hi,
i have a variable which contains some file names delimited by a single space.
FNAME="s1.txt s2.lst s3.cvs s4.lst"
i have another variable that contains a pattern
FILE_PATTERN="*.lst"
i want to take the filenames from FNAME variable and assign each file name in to an array say
for... (8 Replies)
Discussion started by: Little
8 Replies
7. Shell Programming and Scripting
Hi,
I need to extract an info in $1 based on a matched pattern in $2,$3,$4, and $5.
The sample input file as follows:-
ID Pat1 Pat2 Pro1 use1
add41 M M M
add87 M M M M
add32 ... (16 Replies)
Discussion started by: redse171
16 Replies
8. Shell Programming and Scripting
What I would like to do is if the lines with % have the same name, then combine the last 9 letters of the string underneath the last occurrence of that ID with the first 9 letters of the string underneath the first occurrence of that ID.
I have a file that looks like this:
%GOGG... (12 Replies)
Discussion started by: verse123
12 Replies
9. UNIX for Advanced & Expert Users
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
8 Replies
10. UNIX for Beginners Questions & Answers
I have two files say FILE1 and FILE2.
FILE1 contains 80,000 filename in sorted order and another file FILE2 contains 6,000 filenames is also in sorted order.
I want to compare the filename for each file and copy them in to a folder when filename is matched.
File1.txt contain 80,000... (8 Replies)
Discussion started by: imranrasheedamu
8 Replies
LEARN ABOUT DEBIAN
keepalived
keepalived(8) System Manager's Manual keepalived(8)
NAME
keepalived. - keepalive demon
SYNOPSIS
/usr/sbin/keepalived [-n] [-f keepalived.conf] [-d] [-h] [-v]
DESCRIPTION
The keepalived The keepalived server implements the vrrpd routing demon which enables routing failover for a pair (or set) of routers (or
LVS directors) and the keepalived demon which sets up and does the health checking of virtual services in a Linux Virtual Servier.
OPTIONS
--vrrp, -P
Only run the VRRP subsystem.
--check, -C
Only run the healthchecker subsystem.
--dont-release-vrrp, -V
leave (don't remove) VRRP VIPs & VROUTEs on daemon stop.
--dont-release-ipvs, -I
Dont remove IPVS topology on daemon stop.
--dont-fork, -n
Dont fork the daemon process.
--use-file, -f keepalived.conf_file
Use the specified configuration file.
--wdog-vrrp, -R
Define VRRP watchdog polling delay (default=5s)
--wdog-check, -H
Define healthchecker's watchdog polling delay (default=5s)
--dump-conf, -d
Dump the configuration data.
--log-console, -l
Log messages to local console.
--log-detail, -D
Detailed log messages (the default with the rc script provided).
--log-facility, -S
0-7 Set syslog facility to LOG_LOCAL[0-7] (default=LOG_DAEMON)
--help, -h
Display a short inlined help screen.
--version, -v
Display the version number.
FILES
/etc/keepalived/keepalived.conf
SEE ALSO
keepalived.conf(5)
AUTHORS
Joseph Mack
from inspection of the output of keepalived --help from keepalived-1.1.4
Jan 2004 keepalived(8)