hi,
how would i extract a range of lines in a file by using the line number? ex: file contains:
1 title
2 i want
3 this part
4 to be taken out
5 from this file
6 and sent to
7 another file
8 not needed
9 end of file
In this case, i want to copy line number 2 to 7 on a new... (2 Replies)
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
I would like to extract specific lines from a file and output them into another file.
Each line in the file has a unique ID, and I have a specific list of IDs (that are not consecutive) that I wish to extract.
for example:
1 aaaaaa bbbcb cccccc
2 aaaaaa bbbbb cccccd
3 aaaaaa bbbab... (6 Replies)
Hi,
I have a file which contains DDL statements- CREATE TABLE, CREATE INDEX, ALTER TABLE etc.
I have to only pick CREATE TABLE statements from the file-
Source :
----------------------------------------------
--DDL for table abc
--------------------------------------------
CREATE TABLE... (4 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)
Hi,
I have an issue to combine multiple lines of a file. I have records as below.
Fields are delimited by TAB. Each lines are ending with a new line char (\n)
Input
--------
ABC 123456 abcde 987
890456 7890 xyz
ght gtuv
ABC 5tyin 1234 789
ghty kuio
ABC ghty jind 1234
678 ght
... (8 Replies)
Hi,
I look for a awk one liner for below issue.
input file
ABC 1234 abc 12345
ABC 4567 678 XYZ
xyz ght 678
ABC 787 yyuu
ABC 789 7890 777
zxr hyip hyu
mno uii 678 776
ABC ty7 888
All lines should be started with ABC as first field. If a record has another value for 1st... (7 Replies)
I have some text files in a folder named ff as follows. I need to delete the lines (in-place editing)in these files based on another file aa.txt.
32bm.txt:
249 253 A P - 0 0 8 0, 0.0 6,-1.4 0, 0.0 2,-0.4 -0.287 25.6-102.0 -74.4 161.1 37.1 13.3 10.9
250... (2 Replies)
Discussion started by: aden
2 Replies
LEARN ABOUT DEBIAN
sam_hc_callback_register
SAM_HC_CALLBACK_REGISTER(3) Corosync Cluster Engine Programmer's Manual SAM_HC_CALLBACK_REGISTER(3)NAME
sam_hc_callback_register - Register health check callback
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_hc_callback_register (sam_hc_callback_t cb);
DESCRIPTION
The sam_hc_callback_register function is used to register a user provided healthcheck callback. After calling of this function, the SAM is
switched from application driven healthchecking to event driven healthchecking. In this mode, sam_hc_send(3) does not need to be executed.
The parameter cb is callback function of type sam_hc_callback_t defined as:
typedef int (*sam_hc_callback_t)(void);
This function will be regulargly called and must return 0 if the process is functioning normally, or -1 if the process is executing abnor-
mally. When -1 is returned, the SAM server execute the registered recovery policy.
A value of NULL can be passed into this function to switch into application driven healthchecking. cb to NULL.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned.
ERRORS
CS_ERR_BAD_HANDLE
SAM was not initialized and registered or health checking is in running state
CS_ERR_LIBRARY
internal library call failed. This can occur during fork() or pipe () system calls and the errno variable can be read to retrieve
more information.
SEE ALSO sam_start(3), sam_stop(3), sam_hc_send(3), sam_register(3),
corosync Man Page 12/01/2009 SAM_HC_CALLBACK_REGISTER(3)