assuming "cat" is the pattern, string (regardless length)
asdadfcat4
I need to get 4
for eirtrjkkkcat678- I'd get 678
(in b-shell)
Thanks in advance!!! (4 Replies)
This is my first post, please be nice. I have tried to google and read different tutorials.
The task at hand is:
Input file input.txt (example)
abc123defhij-E-1234jslo
456ujs-W-abXjklp
From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Hello,
let's start by giving you guys a few examples of the text:
"READ /TEXT123/ABC123"
"READ /TEXT123/ABC123/"
"READ TEXT123/ABC123"
"READ TEXT123/ABC123/"
"READ TEXT123/TEXT456/ABC123"
"READ /TEXT123/TEXT456/ABC123"
"READ /TEXT123/TEXT456/ABC123/"
TEXT and ABC can be and I... (5 Replies)
Hi
I have a piece of xml that has a pattern like this
<int>159</int><int>30</int>
I want to find this pattern but only substitute the second part of the pattern to {rid1}.
Is that possible in sed ?
Thanks.
---------- Post updated at 12:10 PM ---------- Previous update was at 12:01 PM... (11 Replies)
nautilus is not remembering my settings. I have done everything I can think of to get this to work. I have deleted .gconf, .gconfd, and .gnome2. I tried to start over fresh and that did not work either. What else can I do? (4 Replies)
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)
I read about this guy who always had difficulty remembering his password so he changed his password to "incorrect".
Now when he tries to log in and it fails the system tells him "your password is incorrect". (2 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
LEARN ABOUT DEBIAN
genders_testattrval
GENDERS_TESTATTR(3) LIBGENDERS GENDERS_TESTATTR(3)NAME
genders_testattr - test if a node has an attribute
SYNOPSIS
#include <genders.h>
int genders_testattr(genders_t handle, const char *node, const char *attr, char *val, int len);
int genders_testattrval(genders_t handle, const char *node, const char *attr, const char *val);
DESCRIPTION
genders_testattr() tests if the node pointed to by node contains the attribute pointed to by attr. If node is NULL, the current node is
tested. If the attribute is found, its value is stored in the buffer pointed to by val. len should indicate the length of the buffer. If
the attribute value is not needed, val can be set to NULL.
To avoid passing in an attribute value buffer that is not large enough to store the attribute value, genders_getmaxvallen(3) should be used
to determine the minimum buffer size that should be used.
genders_testattrval() tests if the node pointed to by node contains the attribute pointed to by attr and if that attribute is equal to the
attribute value pointed to by val. If val is NULL, only the attribute is tested.
RETURN VALUES
For genders_testattr(), if the node contains the attribute, 1 is returned. 0 is returned if the node does not contain the attribute.
For genders_testattrval(), if the node contains the attribute and it is equal to the attribute value, 1 is returned. 0 is returned if the
node does not contain the attribute, or if the attribute is not equal to the attribute value.
For both genders_testattr() and genders_testattrval(), -1 is returned on error, and an error code is returned in handle. The error code
can be retrieved via genders_errnum(3) , and a description of the error code can be retrieved via genders_strerror(3). Error codes are
defined in genders.h.
ERRORS
GENDERS_ERR_NULLHANDLE
The handle parameter is NULL. The genders handle must be created with genders_handle_create(3).
GENDERS_ERR_NOTLOADED
genders_load_data(3) has not been called to load genders data.
GENDERS_ERR_OVERFLOW
The buffer pointed to by val is not large enough to store the attribute value.
GENDERS_ERR_PARAMETERS
An incorrect parameter has been passed in.
GENDERS_ERR_NOTFOUND
The node pointed to by node cannot be found in the genders file or if node=NULL, the machine genders is running on is not listed in
the genders database.
GENDERS_ERR_MAGIC
handle has an incorrect magic number. handle does not point to a genders handle or handle has been destroyed by genders_han-
dle_destroy(3).
FILES
/usr/include/genders.h
SEE ALSO libgenders(3), genders_handle_create(3), genders_load_data(3), genders_getmaxvallen(3), genders_errnum(3), genders_strerror(3)LLNL August 2003 GENDERS_TESTATTR(3)