dude, that's the first thing I tried!! no gcc. i think it was manually removed to prevent development on the machine
Shit, that's was my very first attempt to solve someone's problem on this forum, sorry mate, that was all that I could do. I myself have some problems with my gcc. It is located in /usr/sfw/bin/gcc, but when I try to a compile a c++ hello program, it doesn't compile, giving several errors.
Here is my program, maybe you can lend a hand now.
I compile it like this
I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Hi all,
below is the problem details:
ora10g@CNORACLE1>which ld
/usr/ucb/ld
ora10g@CNORACLE1>cd /usr/ccs/bin
ora10g@CNORACLE1>ln -s /usr/ucb/ld ld
ln: cannot create ld: File exists
ora10g@CNORACLE1>
how to link it to /usr/ccs/bin? (6 Replies)
Hi!
All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this... (6 Replies)
hi there,
Would you able to advise that why the syntax or statement below couldn't work as expected ?
/usr/bin/find /backup -name "*tar*" -mtime +2 -exec /bin/rm -f {} \; 1> /dev/null 2>&1
In fact, I was initially located it as in crontab job, but it doesn't work at all. So, I was... (9 Replies)
Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself.
But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Hi Experts,
I found that the same commands(sort, du, df, find, grep etc.) exists in both dir.
What is the difference to use them?
i.e: to use xpg4/bin/grep and usr/bin/grep
My OS version is SunOS 5.10
Regards,
Saps (7 Replies)
Hi Guys,
OS:- Solaris 10 64Bit
I have a small query.
On one server a user is facing sed command issue.
He gets error regarding sed for this location
/users/hoy/2999/batch5/bin/internal.sh: /usr/local/bin/sed: not found
How ever the sed is actually present at this location on server:-... (13 Replies)
I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries.
I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble:
$ ./autogen.sh
checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies
LEARN ABOUT X11R4
pcresample
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)