10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have created a sysinfo script to capture the system information on daily basis which run in cron jobs.
Whereas, the output saved in the file are getting disapperared after some times..
Mainly for eg: the lvm commands like pvs,lvs, vgs, lvdisplay, pvdisplay..
... (2 Replies)
Discussion started by: gsiva
2 Replies
2. Programming
(Apologies for any typos.)
OSX 10.12.3 AND Windows 10.
This is for the serious Python experts on at least 3.5.x and above...
In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly.
Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
3. OS X (Apple)
Hi guys,
I just installed a plugin (script) at my MacVim -> MacVim.app/Contents/Resources etc. and the plug is installed! However when I load other files with vim which came with the MacOSX (by default) the plugin is not installed ... since I did not installed in that directory! PLEASE let me... (3 Replies)
Discussion started by: c_lady
3 Replies
4. Solaris
Hi,
I would like to rename log files with sys date as extension.
eg xyz.log --> xyz.log.01-21-2011
How do I do this? Any hints? (1 Reply)
Discussion started by: neil.k
1 Replies
5. UNIX for Advanced & Expert Users
I need a real help to compile a small program which compiles fine with g++ in Linux machines. However I need to compile-it in my machine with g++. I have this problem and I dont know how to solve it: sys/sysinfo.h: No such file or directory could someone please help me? Thanks (2 Replies)
Discussion started by: c_lady
2 Replies
6. Solaris
Hi,
When I include a user to the secondary group "sys" GID=3 in Solaris 9 OS I'm not able to login. I get these error. The user home directory and the shell exists. Is this because of any security hardening.
# su - agent
No directory!
# su agent
su: No shell
# grep taddm /etc/passwd... (14 Replies)
Discussion started by: agent001
14 Replies
7. UNIX for Advanced & Expert Users
What is everyone using as a multi-platform replacement for "sysinfo" (licensing required nowadays)? (3 Replies)
Discussion started by: kickslop
3 Replies
8. UNIX for Advanced & Expert Users
Can someone help me in fixing this issue..
this is the result iam getting now..
----------------------------------------------
Index of /SysInfo
Parent Directory
hndspdb1.html
hndspdb2.html
hndspdb3.html
hndspdb4.html
hndssdb1.html
hndssdb2.html... (1 Reply)
Discussion started by: kjamsheed
1 Replies
9. Solaris
Hi,
I refer to this treat. I got the same objective, to capture serial number.
when I type command sysinfo not found.
but my system have 'man -s 2 sysinfo'.
How to make sysinfo command work.
FYI i'm using Solaris 10 11/06. (1 Reply)
Discussion started by: apip
1 Replies
10. OS X (Apple)
Hello, Do you guys know how does the root user works in this system?
from the terminal i try to su to root, and i thought the password was the same as the macosx password, at the /etc/passwd file the passwd field appears as *, so it's system bussines only, is there a way to become root? i... (6 Replies)
Discussion started by: sx3v1l_1n51de
6 Replies
PCRESAMPLE(3) Library Functions Manual PCRESAMPLE(3)
NAME
PCRE - Perl-compatible regular expressions
PCRE SAMPLE PROGRAM
A simple, complete demonstration program, to get you started with using PCRE, is supplied in the file pcredemo.c in the PCRE distribution.
The program compiles the regular expression that is its first argument, and matches it against the subject string in its second argument.
No PCRE options are set, and default character tables are used. If matching succeeds, the program outputs the portion of the subject that
matched, together with the contents of any captured substrings.
If the -g option is given on the command line, the program then goes on to check for further matches of the same regular expression in the
same subject string. The logic is a little bit tricky because of the possibility of matching an empty string. Comments in the code explain
what is going on.
If PCRE is installed in the standard include and library directories for your system, you should be able to compile the demonstration pro-
gram using this command:
gcc -o pcredemo pcredemo.c -lpcre
If PCRE is installed elsewhere, you may need to add additional options to the command line. For example, on a Unix-like system that has
PCRE installed in /usr/local, you can compile the demonstration program using a command like this:
gcc -o pcredemo -I/usr/local/include pcredemo.c
-L/usr/local/lib -lpcre
Once you have compiled the demonstration program, you can run simple tests like this:
./pcredemo 'cat|dog' 'the cat sat on the mat'
./pcredemo -g 'cat|dog' 'the dog sat on the cat'
Note that there is a much more comprehensive test program, called pcretest, which supports many more facilities for testing regular expres-
sions and the PCRE library. The pcredemo program is provided as a simple coding example.
On some operating systems (e.g. Solaris), when PCRE is not installed in the standard library directory, you may get an error like this when
you try to run pcredemo:
ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
This is caused by the way shared library support works on those systems. You need to add
-R/usr/local/lib
(for example) to the compile command to get round this problem.
AUTHOR
Philip Hazel
University Computing Service
Cambridge CB2 3QH, England.
REVISION
Last updated: 23 January 2008
Copyright (c) 1997-2008 University of Cambridge.
PCRESAMPLE(3)