Sponsored Content
Full Discussion: occurences of words
Top Forums Shell Programming and Scripting occurences of words Post 302239597 by otheus on Wednesday 24th of September 2008 04:53:49 AM
Old 09-24-2008
Quote:
Originally Posted by vanitham
Code:
$query="profile*" or "prof*";

You do realize this gives you the first one always, right?


Quote:
$regex =~ s/$/.*?/g;
And this gives you a regex string of "profile*.*?" which means "profil" will match.

Last edited by otheus; 09-24-2008 at 05:54 AM.. Reason: misplaced endtag
 

10 More Discussions You Might Find Interesting

1. Web Development

Retrieve all matches of occurences of words

Hi, I have rows like this. Retractor muscle (PRM) of Helix pomatia Genetic characterization of a prm- mutant Values of PRM data. Expression pattern of prmt5 in adult fish. PRMT-5 negatively regulates DNA genetic fusions of prM-E protein Methylation of Xilf3 by Xprmt1b... (1 Reply)
Discussion started by: vanitham
1 Replies

2. UNIX for Dummies Questions & Answers

Adding words after a set of words

Greetings. I am a UNIX newbies. I am currently facing difficulties dealing with a large data set and I would like to ask for helps. I have a input file like this: ak 1 AAM1 ak 2 AAM1 ak 3 AAM1 ak 11 AMM2 ak 12 AMM2 ak 13 AMM2 ak 14 AMM2 Is there any possibility for me to... (7 Replies)
Discussion started by: Amanda Low
7 Replies

3. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

4. Shell Programming and Scripting

SED - delete words between two possible words

Hi all, I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line. Let me paste an 2 examples: anything before any string begin few lines of content end1 anything after anything before any... (4 Replies)
Discussion started by: meuser
4 Replies

5. Shell Programming and Scripting

How count the number of two words associated with the two words occurring in the file?

Hi , I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies

6. Shell Programming and Scripting

Gawk gensub, match capital words and lowercase words

Hi I have strings like these : Vengeance mitt Men Vengeance gloves Women Quatro Windstopper Etip gloves Quatro Windstopper Etip gloves Girls Thermobite hooded jacket Thermobite Triclimate snow jacket Boys Thermobite Triclimate snow jacket and I would like to get the lower case words at... (2 Replies)
Discussion started by: louisJ
2 Replies

7. UNIX for Dummies Questions & Answers

Replace the words in the file to the words that user type?

Hello, I would like to change my setting in a file to the setting that user input. For example, by default it is ONBOOT=ON When user key in "YES", it would be ONBOOT=YES -------------- This code only adds in the entire user input, but didn't replace it. How do i go about... (5 Replies)
Discussion started by: malfolozy
5 Replies

8. UNIX for Dummies Questions & Answers

Deleting words between every appearance of two words

Hi there, newbie there. I've been browsing the forums hoping to find a solution that answers a problem similar to what I need, but haven't had much luck. Any help would be greatly appreciated. Thanks! I need to delete a bunch of text between every appearance of two words in a really large file... (3 Replies)
Discussion started by: lendl
3 Replies

9. Shell Programming and Scripting

Search words in any quote position and then change the words

hi, i need to replace all words in any quote position and then need to change the words inside the file thousand of raw. textfile data : "Ninguno","Confirma","JuicioABC" "JuicioCOMP","Recurso","JuicioABC" "JuicioDELL","Nulidad","Nosino" "Solidade","JuicioEUR","Segundo" need... (1 Reply)
Discussion started by: benjietambling
1 Replies

10. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
prof(5) 							File Formats Manual							   prof(5)

Name
       prof - profile within a function

Syntax
       #define MARK
       #include <prof.h>

       void MARK (name)

Description
       The  symbol  produces  a mark called name that is treated the same as a function entry point.  Execution of the mark increments the counter
       for that mark, and the program-counter time spent is accounted to the preceding mark or to the function if a preceding mark is  not  within
       the active function.

       The  name argument can be any combination of numbers or underscores.  Each name in a single compilation must be unique, but can be the same
       as any ordinary program symbol.

       For marks to be effective, the symbol must be defined before the header file is included.  This may be defined by a preprocessor  directive
       as in the synopsis, or by a command line argument.  For example:
       cc -p -DMARK foo.c
       If is not defined, the statements may remain in the source files, but they will be ignored.

Examples
       In  the following example, marks are used to determine how much time is spent in each loop.  Unless the example is compiled with defined on
       the command line, the marks are ignored:
       #include <prof.h>
       foo( )
       {
	    int i, j;
	    .
	    .
	    .
	    MARK(loop1);
	    for (i = 0; i < 2000; i++) {
		 . . .
	    }
	    MARK(loop2);
	    for (j = 0; j < 2000; j++) {
		 . . .
	    }
       }

See Also
       prof(1), profil(2), monitor(3c)

								       RISC								   prof(5)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy