11-24-2017
Yes the ^ is the "beginning of the line" anchor.
Then you do not need the other \< "left word boundary" anchor.
But the \> "right word boundary" is useful so it does not match Johnny.
Even better would be the field separator, then it would not even match John-Mary. The field separator is the character : (or in the case of "space" a character set that consists of a character class [[:space:]].
For your challenge "above 3.69 below 4.0" match a 3 then a dot then a character set 7-9. Assuming that there is not a further decimal digit e.g. 3.699
Often forgotten: in a regular expression a plain . is an "any character" wildcard, so in order to match a literal dot you need to escape it \. or put it in a character set [.]
Last edited by MadeInGermany; 11-24-2017 at 03:54 AM..
6 More Discussions You Might Find Interesting
1. Programming
Help! I am very stuck!!!
I have to produce a practical implementation of ONC RPC for an assignment and I do not know where to start. I hve done much searching on sun's site but everything is too complicated for someone with my limited knowledge. I only know the very basic unix commands and have... (1 Reply)
Discussion started by: karen79
1 Replies
2. Linux
I know taking the easy way out isn't going to help me learn anything, but hopefully it will at least give me some guidence...
I have a project and here's what I have to do... A company is currently running a Digital VAX and I have to replace it with a Linux server. There are 19 terminals... (4 Replies)
Discussion started by: MGold4357
4 Replies
3. Shell Programming and Scripting
Is there anyone here that can help me with my unix assignment? I've been working on it for 3 days now. It is regarding writing a script. I've got a few questions that I need some answers. Please someone who are willing to help add me to their msn messenger: ****************
In one part of... (0 Replies)
Discussion started by: DaSFLiP
0 Replies
4. UNIX for Dummies Questions & Answers
yes im a student at Sandersville Technical College in Sandersville, Georgia.
Im doing a presentation on UNIX can someone help me discribe what UNIX is and how to use it and the different features it has? (6 Replies)
Discussion started by: willnadaze
6 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone.
Let me just start off by saying I'm a college student and I love playing around with UNIX.
I registered here because I have a UNIX shell scripting class and I am having some issues with my homework. I'm not looking for answers to the problems, just some help to get me on my way.... (1 Reply)
Discussion started by: Hexum311
1 Replies
6. UNIX for Beginners Questions & Answers
I am a student in a UNIX/Linux classes having hard time with grep looking for assistance on some home work
I need to figure out some kind of grep command to get a out put that only gives me information from a sample file and only list the people with the first name John the sample file is named... (1 Reply)
Discussion started by: jetoutant
1 Replies
LEARN ABOUT DEBIAN
cgrules.conf
CGRULES.CONF(5) libcgroup Manual CGRULES.CONF(5)
NAME
cgrules.conf - libcgroup configuration file
DESCRIPTION
cgrules.conf configuration file is used by libcgroups to define control groups to which a process belongs.
The file contains a list of rules which assign to a defined group/user a control group in a subsystem (or control groups in subsystems).
Rules have two formats:
<user> <controllers> <destination>
<user>:<process name> <controllers> <destination>
Where:
user can be:
- a user name
- a group name with @group syntax
- the wildcard '*', for any user or group
- '%', which is equivalent to "ditto" (useful for
multi-line rules where different cgroups need to be
specified for various hierarchies for a single user)
process name is optional and it can be:
- a process name
- a full command path of a process
controllers can be:
- comma separated controller names (no spaces) or
- * (for all mounted controllers)
destination can be:
- path relative to the controller hierarchy (ex. pgrp1/gid1/uid1)
- following strings will get expanded
%u username, uid if name resolving fails
%U uid
%g group name, gid if name resolving fails
%G gid
%p process name, pid if name not available
%P pid
'' can be used to escape '%'
First rule which matches the criteria will be executed.
Any text starting with '#' is considered as a start of comment line and is ignored.
EXAMPLES
student devices /usergroup/students
Student's processes in the 'devices' subsystem belong to the control group /usergroup/students.
student:cp devices /usergroup/students/cp
When student executes 'cp' command, the processes in the 'devices' subsystem belong to the control group /usergroup/students/cp.
@admin * admingroup/
Processes started by anybody from admin group no matter in what subsystem belong to the control group admingroup/.
peter cpu test1/
% memory test2/
The first line says Peter's task for cpu controller belongs to test1 control group. The second one says Peter's tasks for memory controller
belong to test2/ control group.
* * default/
All processes in any subsystem belong to the control group default/. Since the earliest matched rule is applied, it makes sense to have
this line at the end of the list. It will put a task which was not mentioned in the previous rules to default/ control group.
FILES
/etc/cgrules.conf
default libcgroup configuration file
SEE ALSO
cgconfig.conf (5), cgclassify (1), cgred.conf (5)
BUGS
Linux 2009-03-10 CGRULES.CONF(5)