Sponsored Content
Full Discussion: Question related to 'ps'
Top Forums UNIX for Dummies Questions & Answers Question related to 'ps' Post 302649437 by Corona688 on Thursday 31st of May 2012 10:20:55 AM
Old 05-31-2012
A better way is to change the pattern so it doesn't match itself.

Code:
ps aux | grep '[m]yprocessname'

The [m] matches 'myprocessname' but doesn't match '[m]yprocessname'.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A Question related to the net

well, I was suggested to remove the contents of the cache as i get out of the browser netscape from the .netscape folder. is that really necessary? if so what are the rest to be done? can anybody please tell me?:rolleyes: (8 Replies)
Discussion started by: sskb
8 Replies

2. Shell Programming and Scripting

a math related question

hello: First I know the rules on Homework related questions, I wrote my script, but I cannot seem to figure out how to do one math problem. How do I take a zip code and seperate the idvidual digits? I used the modulus expression and divided the number by 10 ^ n but that only worked... (9 Replies)
Discussion started by: jahjah
9 Replies

3. Programming

signals related question

Hi all, Just a little question relative to signals. I know that if an application is in the sleep state, When a signal is catched, it will be processed by the handler. But what happens if it's processing something? Does the processing stops?? The following code should illustrate this case ... (2 Replies)
Discussion started by: ninjanesto
2 Replies

4. UNIX for Advanced & Expert Users

One Question related to alias

Hello, I have created following alias in csh lab 'rlogin -l user23 complab23' but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies

5. Solaris

RBAC related question.....

I am referring Bill Calkins(SCSA exam prep) for RBAC..actually i wanted to make a normal user to get the privilege to run a command through authorization, not through profile files... This is the exact steps given by Bill calkins.. 1.roleadd -m -d /export/home/adminusr -c... (11 Replies)
Discussion started by: saagar
11 Replies

6. Shell Programming and Scripting

having df command related question

Hi All, When i have run the below command its showing 90% which is critical for production. for this i need the answer of some below question please help me for that. 1) i want to delete some unwanted files. how can i know the unwanted files ?Is it there any way of knowing this?? 2)and... (2 Replies)
Discussion started by: aish11
2 Replies

7. Shell Programming and Scripting

awk related question

awk "/^<Mar 31, 2012 : /,0" /app/blah.log can someone please help me figure out why the above command isn't pulling anything out from the log? basically, i want it to pull out all records, from the very first line that starts with the date "Mar 31, 2012" and that also has a time immediately... (4 Replies)
Discussion started by: SkySmart
4 Replies

8. Shell Programming and Scripting

Perl related question

hi, iam perl begginer,i have written the program #!/usr/bin/perl #use warnings; use strict; print "Enter the name:","\n"; my $name=<STDIN>; my %hash=(siva => "9902774481", dev => "9916391244", venky => "9440506760", manohar => "9440232695" ); print "$name no is:... (5 Replies)
Discussion started by: siva.hardwork
5 Replies

9. Shell Programming and Scripting

awk related question

awk -F ";" 'FNR==NR{a=$1;next} ($2 in a)' server.list datafile | while read line do echo ${line} done when i run the above, i get this: 1 SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... instead of: SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... can... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. UNIX for Dummies Questions & Answers

Question related to grep

We have huge file with control A as delimiter. Somehow one record is corrupted. This time i figured it out using ETL graph. If future , how to print only bad record. Example Correct record:... (2 Replies)
Discussion started by: srikanth38
2 Replies
uwildmat(3)						    InterNetNews Documentation						       uwildmat(3)

NAME
uwildmat, uwildmat_simple, uwildmat_poison - Perform wildmat matching SYNOPSIS
#include <inn/libinn.h> bool uwildmat(const char *text, const char *pattern); bool uwildmat_simple(const char *text, const char *pattern); enum uwildmat uwildmat_poison(const char *text, const char *pattern); DESCRIPTION
uwildmat compares text against the wildmat expression pattern, returning true if and only if the expression matches the text. "@" has no special meaning in pattern when passed to uwildmat. Both text and pattern are assumed to be in the UTF-8 character encoding, although malformed UTF-8 sequences are treated in a way that attempts to be mostly compatible with single-octet character sets like ISO 8859-1. (In other words, if you try to match ISO 8859-1 text with these routines everything should work as expected unless the ISO 8859-1 text contains valid UTF-8 sequences, which thankfully is somewhat rare.) uwildmat_simple is identical to uwildmat except that neither "!" nor "," have any special meaning and pattern is always treated as a single pattern. This function exists solely to support legacy interfaces like NNTP's XPAT command, and should be avoided when implementing new features. uwildmat_poison works similarly to uwildmat, except that "@" as the first character of one of the patterns in the expression (see below) "poisons" the match if it matches. uwildmat_poison returns UWILDMAT_MATCH if the expression matches the text, UWILDMAT_FAIL if it doesn't, and UWILDMAT_POISON if the expression doesn't match because a poisoned pattern matched the text. These enumeration constants are defined in the inn/libinn.h header. WILDMAT EXPRESSIONS
A wildmat expression follows rules similar to those of shell filename wildcards but with some additions and changes. A wildmat expression is composed of one or more wildmat patterns separated by commas. Each character in the wildmat pattern matches a literal occurrence of that same character in the text, with the exception of the following metacharacters: ? Matches any single character (including a single UTF-8 multibyte character, so "?" can match more than one byte). * Matches any sequence of zero or more characters. Turns off any special meaning of the following character; the following character will match itself in the text. "" will escape any character, including another backslash or a comma that otherwise would separate a pattern from the next pattern in an expression. Note that "" is not special inside a character range (no metacharacters are). [...] A character set, which matches any single character that falls within that set. The presence of a character between the brackets adds that character to the set; for example, "[amv]" specifies the set containing the characters "a", "m", and "v". A range of characters may be specified using "-"; for example, "[0-5abc]" is equivalent to "[012345abc]". The order of characters is as defined in the UTF-8 character set, and if the start character of such a range falls after the ending character of the range in that ranking the results of attempting a match with that pattern are undefined. In order to include a literal "]" character in the set, it must be the first character of the set (possibly following "^"); for example, "[]a]" matches either "]" or "a". To include a literal "-" character in the set, it must be either the first or the last character of the set. Backslashes have no special meaning inside a character set, nor do any other of the wildmat metacharacters. [^...] A negated character set. Follows the same rules as a character set above, but matches any character not contained in the set. So, for example, "[^]-]" matches any character except "]" and "-". In addition, "!" (and possibly "@") have special meaning as the first character of a pattern; see below. When matching a wildmat expression against some text, each comma-separated pattern is matched in order from left to right. In order to match, the pattern must match the whole text; in regular expression terminology, it's implicitly anchored at both the beginning and the end. For example, the pattern "a" matches only the text "a"; it doesn't match "ab" or "ba" or even "aa". If none of the patterns match, the whole expression doesn't match. Otherwise, whether the expression matches is determined entirely by the rightmost matching pattern; the expression matches the text if and only if the rightmost matching pattern is not negated. For example, consider the text "news.misc". The expression "*" matches this text, of course, as does "comp.*,news.*" (because the second pattern matches). "news.*,!news.misc" does not match this text because both patterns match, meaning that the rightmost takes precedence, and the rightmost matching pattern is negated. "news.*,!news.misc,*.misc" does match this text, since the rightmost matching pattern is not negated. Note that the expression "!news.misc" can't match anything. Either the pattern doesn't match, in which case no patterns match and the expression doesn't match, or the pattern does match, in which case because it's negated the expression doesn't match. "*,!news.misc", on the other hand, is a useful pattern that matches anything except "news.misc". "!" has significance only as the first character of a pattern; anywhere else in the pattern, it matches a literal "!" in the text like any other non-metacharacter. If the uwildmat_poison interface is used, then "@" behaves the same as "!" except that if an expression fails to match because the rightmost matching pattern began with "@", UWILDMAT_POISON is returned instead of UWILDMAT_FAIL. If the uwildmat_simple interface is used, the matching rules are the same as above except that none of "!", "@", or "," have any special meaning at all and only match those literal characters. BUGS
All of these functions internally convert the passed arguments to const unsigned char pointers. The only reason why they take regular char pointers instead of unsigned char is for the convenience of INN and other callers that may not be using unsigned char everywhere they should. In a future revision, the public interface should be changed to just take unsigned char pointers. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> in 1986, and posted to Usenet several times since then, most notably in comp.sources.misc in March, 1991. Lars Mathiesen <thorinn@diku.dk> enhanced the multi-asterisk failure mode in early 1991. Rich and Lars increased the efficiency of star patterns and reposted it to comp.sources.misc in April, 1991. Robert Elz <kre@munnari.oz.au> added minus sign and close bracket handling in June, 1991. Russ Allbery <rra@stanford.edu> added support for comma-separated patterns and the "!" and "@" metacharacters to the core wildmat routines in July, 2000. He also added support for UTF-8 characters, changed the default behavior to assume that both the text and the pattern are in UTF-8, and largely rewrote this documentation to expand and clarify the description of how a wildmat expression matches. Please note that the interfaces to these functions are named uwildmat and the like rather than wildmat to distinguish them from the wildmat function provided by Rich $alz's original implementation. While this code is heavily based on Rich's original code, it has substantial differences, including the extension to support UTF-8 characters, and has noticable functionality changes. Any bugs present in it aren't Rich's fault. $Id: uwildmat.pod 9074 2010-05-31 19:01:32Z iulius $ SEE ALSO
grep(1), fnmatch(3), regex(3), regexp(3). INN 2.5.3 2011-06-10 uwildmat(3)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy