I am on AIX 5.1
If I have a crontab that looks like this
01 1 * * 6
What does the 6 mean ? if the * means that everyday it should run then why would the 6th day be signified ? Shouldn't it be a * also?
Thanks (1 Reply)
I have a tab delimited file with many lines, one for each record.
each line is tab delimited with a tab before the first data field, a tab between each data field, and a tab after the last data field before it moves onto the next line.
I need to remove only the preceeding tab before the first... (2 Replies)
When formatting a script let's say for instance the following:
case ${choice} in
1)
vi ${tmp1}.tmp
# overwrite the tmp1 var with any user changes
cp ${tmp1}.tmp ${tmp1}
;;
... (2 Replies)
Hi People,
Does gvim latest versions support tabs. I would like to open different files in tabs rather than new windows or split windows. I would like to whether the current version supports it, if it doesn't then how to add such feature.
Thanks,
:) (2 Replies)
Hi,
I have a file that has too many tabs between columns. I cannot get the tabs out. Basically the tab between column 1 and 2 are fine but between 2/3, 3/4 etc are like 5 tabs. How do I get rid of these 5 tabs so its just 1 tab.
thanks (3 Replies)
Hi Guys
i current use Kcosole i have this liitle code that changes the tilte to the current directory that i am in
# Set the terminal title to pwd
case $TERM in
xterm*)
precmd() {print -Pn "\e]0;%~ \a"}
;;
esac
in Kconsole you can have... (0 Replies)
I am trying to get this to display vertically like in a table but it keeps jumping to a new line
dev=$(df -h | grep ^/dev | cut -d " " -f1)
dev1=$(df -h | grep ^/dev | cut -f 2 -d "%")
dev2=$(df -h | grep ^/dev | cut -f 14-16 -d " ")
dev3=$(df -h | grep ^/dev | cut -f 18-20 -d " ")... (1 Reply)
I want to know how can I remove all the tabs (\t) from a tab delimited file. In my file some of the rows only contain one column and rest are unoccupied but the tabs are there. When I performed some regular expressions to do substitutions like:
%s/\t/\/\/ /ig
all the hidden tabs are converted... (4 Replies)
Hi Everybody! First post! Totally noobie.
I'm using the terminal to read a poorly formatted book.
The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this.
I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies
LEARN ABOUT DEBIAN
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.
A listing of this program is given in the pcredemo documentation. If you do not have a copy of the PCRE distribution, you can save this
listing to re-create pcredemo.c.
The demonstration program, which uses the original PCRE 8-bit library, 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 operating system, you should be able to compile the demon-
stration program 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
In a Windows environment, if you want to statically link the program against a non-dll pcre.a file, you must uncomment the line that
defines PCRE_STATIC before including pcre.h, because otherwise the pcre_malloc() and pcre_free() exported functions will be declared
__declspec(dllimport), with unwanted results.
Once you have compiled and linked 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 both PCRE libraries. The pcredemo program is provided as a simple coding example.
If you try to run pcredemo when PCRE is not installed in the standard library directory, you may get an error like this on some operating
systems (e.g. Solaris):
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: 10 January 2012
Copyright (c) 1997-2012 University of Cambridge.
PCRESAMPLE(3)