I have a file containing the following contents
All of us, including Zippy, our dog
All of us, including Zippy and Zippy
All of us, including Zippy and Zippy and Zelda
Testing All of us Zippy
Now, i wanna grep and get the lines which has only one occurance of word Zippy and starting with... (1 Reply)
Hi all,
I need to extract some lines from a file based on a condition. For ex:
My file will contain 50 lines and i need to extract line which has "File" in it and then the line which has "date" in it. Which command will be the most efficient way to do it. I have tried two ways
1.... (1 Reply)
Hi,
I have a sql file and i need to extract the table names used in the sql file using a unix script. If i can extract the lines between the keywords 'FROM' and 'WHERE' in the file, my job is done. can somebody tell me how to do this using a shell script. If u can just let me know, how to... (2 Replies)
I have a file with 14million lines and I would like to extract all the unique lines from the file into another text file.
For example:
Contents of file1
happy
sad
smile
happy
funny
sad
I want to run a command against file one that only returns the unique lines (ie 1 line for happy... (3 Replies)
i want to extract lines 5 and 7 from a txt file which contains nearly 20 entries how to do it
also i want to check whether the 42nd character is 'S' in that line
suggestions welcome (4 Replies)
Hi,
anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time)
Jun 18 00:16:50 .......... ............. ............
Jun 18 00:17:59 .......... ............. ............
Jun 18 01:17:20 .......... ............. ............
Jun 18... (5 Replies)
hi all,
i searched in unix.com and accquired the following commands for extracting specific lines from a file ..
sed -n '16482,16482p' in.sql > out.sql
awk 'NR>=10&&NR<=20' in.sql > out.sql....
these commands are working fine if i give the line numbers as such .. but if i pass a... (2 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
consider i have two files
cat onlyviews1.sql
CREATE VIEW V11
AS
SELECT id,
name,
FROM
etc etc
WHERE etc etc;
CREATE VIEW V22
AS
SELECT id,
name,
FROM
etc etc
WHERE etc etc;
CREATE VIEW V33
AS (10 Replies)
consider the input file which i am dealing with looks like this..
#cat 11.sql
create table abc (
.
.
.
) engine=Innodb ;
.
.
etc
.
.
.
create table UsM (
blah
blah
blah
) engine=Innodb ; (5 Replies)
Discussion started by: vivek d r
5 Replies
LEARN ABOUT DEBIAN
sam_initialize
SAM_INITIALIZE(3) Corosync Cluster Engine Programmer's Manual SAM_INITIALIZE(3)NAME
sam_initialize - Initialize health checking
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_initialize (int time_interval, sam_recovery_policy_t recovery_policy);
DESCRIPTION
The sam_initialize function is used to initialize health checking of a process.
Application can have only one instance of SAM. This function must be called before any other of SAM functions. It is recommended to ini-
tialize before the process begins any process initialization.
The time_interval parameter is a timeout in milliseconds before taking recovery action after having not received a healthcheck.
If time_interval parameter is zero, there is no time limit and no healthcheck must be sent by the process. In this operational mode, a
process failure will continue to execute the recovery policy.
The recovery_policy is defined as type:
typedef enum {
SAM_RECOVERY_POLICY_QUIT = 1,
SAM_RECOVERY_POLICY_RESTART = 2,
} sam_recovery_policy_t;
where
SAM_RECOVERY_POLICY_QUIT
on failure, the process will terminate.
SAM_RECOVERY_POLICY_RESTART
on failure, the process will restart.
To perform event driven healthchecking, sam_register(3) and sam_start(3) functions must called. Event driven healthchecking causes the
duplicate standby process running the SAM serve rto periodically request healthchecks from the active process.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned.
ERRORS
CS_ERR_BAD_HANDLE
can happened in case of double initialization.
CS_ERR_INVALID_PARAM
recovery_policy has invalid value.
SEE ALSO sam_register(3), sam_start(3), sam_hc_callback_register(3)corosync Man Page 12/01/2009 SAM_INITIALIZE(3)