I have a number of files that I pass through awk/gsub.
I believe to have found a working regex and on 'test bed' sites it matches, however within gsub it does not.
Examples:
Initial data:
gsub & regex:
I've been able to remove mostly everything with other expressions but the first brackets "[sage]" still remain. The content within the brackets varies a lot (e.g. [SFW-sage].
I'd like to keep the script as simple as possible (one line).
Hello,
from the gnu sed manual, I should be able to do this:
`\(REGEXP\)'
Groups the inner REGEXP as a whole, this is used to:
* Apply postfix operators, like `\(abcd\)*': this will search
for zero or more whole sequences of `abcd', while `abcd*'
... (3 Replies)
Why is only hello3 being printed? There must be some kind of syntax problem because the file list definitely includes all the file extensions line by line.
#!/bin/bash
find '/home/myuser/folder/' -name '*.c' -type f | while read F
do
if ] # if the file name ends in .txt.c
then
... (6 Replies)
Hi,
I'm trying to validate if a string matches a regular expression, but it is not working. Am I missing something? Do I need to scape any of the characters?
if echo 'en-GB' | egrep '({1,8})(-{1,8})*' >/dev/null; then
echo Valid value
fi
Thanks in advance (6 Replies)
I am trying to write my gsub regex to replace a bunch of special characters with spaces, so i can split it to an array and look at each word independently.
However, my regex skills are slightly lacking and I appear to be missing a quote or something here.
I am trying to replace the following... (6 Replies)
Hello to all,
The Regex below is supposed to match all strings except RR45. I've tested in regex101.com and it works, butwhen I try to use it with the perl command below I get the error shown.
Regex=(?<=^|RR45)(?!RR45).+?(?=RR45|$)
How to fix this? I'm using Cygwin.
$ echo... (9 Replies)
Hi Experts,
Need your kind help with gsub awk.
Below is my pattern:"exec=1_host_cnt=100_dup=4_NameTag=targetSrv_500.csv","'20171122112948"," 100"," 1"," 1"," 4","400","","",
" aac sample exec ""hostname=XXXXX commandline='timeout 10 openssl speed -multi 2 ; exit 0'"" ","-1","-1","1","... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
LEARN ABOUT CENTOS
sage
sage(3) Library Functions Manual sage(3)NAME
sage - The SDL library for OpenGL extensions.
DESCRIPTION
#include <sage/sage.h>
Sage is a small C library providing Open GL extensions to applications using SDL. It has been automatically generated from the glext.h
header file from the OpenGL website. The Sage source package comes with the Perl scripts to generate new sources from updated glext.h
files.
Additionally, it provides a way of accessing the standard GL and GLU headers in a cross platform method. sage/GL.h and sage/GLU.h should be
used in place of gl/GL.h and gl/GLU.h (or the equivalent on other platforms.)
To use Sage, an application must first call sage_init once the OpenGL context has been created. This checks for the existence of each
extension it knows about and links up the appropriate function pointers. The array sage_ext sets each exension that is found to 1, and 0
otherwise. Applications should check the existence of the extension in sage_ext before using it.
Extensions can then be used by their name as defined in the spec.
BUGS
Sage does not check to see of the OpenGL context is valid.
On some systems, the standard Open GL header causes problems with sage (namespace conflicts).
Apparently some broken GL implmentations may report the existence of an extension, but not actually provide it. Sage will not detect this.
AUTHOR
Simon Goodall (simon (at) simongoodall.co.uk)
SEE ALSO sage_init(3)
September 22, 2005 sage(3)