Well, I suppose this depends on which subset of the regular expressions the extension writer decided to use. The ones used by PHP vary, and the ones used by MySQL are POSIX compliant. So we'll try a POSIX compliant version:
But it's difficult to say if it will work correctly or not.
Hi,
I have a file that contains the following contents:
14:05 apple
orange123
456mango
16:45 banana
I wanted to replace ONLY the "14:05 " and "16:45" with nothing and trying to use the following syntax
sed -e 's/*//g' -e 's/^: //g' my_file > new_temp
cat new_temp
apple
orange... (2 Replies)
Hi all,
I have one question that hopefully isn't too complicated for the more advanced users here. In one of the Solaris KSH scripts I'm working on, is it possible to script the following:
- If there "is" an empty blank line "at the end" of /tmp/text.txt, then remove only that one empty... (3 Replies)
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Hi,
I'm trying to match the front and back of a sequence. It works when there is an exact match (obviously), but I need the regex to be more flexible. When we get strings of nucleotides sometimes their prefixes and suffixes aren't exact matches. Sometimes there will be an extra letter and... (2 Replies)
Hi all,
I am trying to modify an xml file and I wanted to search and replace using the sed command but here is my issue. I want to search and replace maximumHeapSize="512" and replace it with maximumHeapSize="768" but I have multiple files with different values so I can't search for... (2 Replies)
I have file which contains data in the following format all in a single line:
BDW_PUBLN_ID DECIMAL(18:0) NOT NULL PRIMARY INDEX ARGO_ACCT_DEP_PI ( OFC_ID ,CSHBX_ID ,TRXN_SEQ_NUM ,PROCG_DT ) PARTITION BY RANGE_N(PROCG_DT BETWEEN DATE '2012-03-01' AND DATE '2014-12-31' EACH INTERVAL '1' MONTH );... (4 Replies)
Have Pipe Delimited File:
> BRYAN BAKER|4/4/2015|518 VIRGINIA AVE|TEST
> JOE BAXTER|3/30/2015|2233 MockingBird RD|ROW2On 3rd column where the address is located, I want to add a space after every numeric value - basically doing a "s//&\ / ":
> BRYAN BAKER|4/4/2015|5 1 8 VIRGINIA AVE|TEST
> JOE... (5 Replies)
Hi,
Below is an excerpt from a 20000+ lines and I want to do a search and replace of a specific string but I don't know how and I can't figure out how to. Can't find an example from Google or anywhere to do what I am wanting to do.
A 2018-11-21 08:42:17 TEST_TEST 2018-11-21... (9 Replies)
Discussion started by: newbie_01
9 Replies
LEARN ABOUT CENTOS
strerror_r
STRERROR(3) Linux Programmer's Manual STRERROR(3)NAME
strerror, strerror_r - return string describing error number
SYNOPSIS
#include <string.h>
char *strerror(int errnum);
int strerror_r(int errnum, char *buf, size_t buflen);
/* XSI-compliant */
char *strerror_r(int errnum, char *buf, size_t buflen);
/* GNU-specific */
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
The XSI-compliant version of strerror_r() is provided if:
(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
Otherwise, the GNU-specific version is provided.
DESCRIPTION
The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the
LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description
will "Invalid argument".) This string must not be modified by the application, but may be modified by a subsequent call to strerror(). No
library function, including perror(3), will modify this string.
The strerror_r() function is similar to strerror(), but is thread safe. This function is available in two versions: an XSI-compliant ver-
sion specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (avail-
able since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the
GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_SOURCE is defined by
default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.
The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of
length buflen.
The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that
the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string
in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always
includes a terminating null byte ('