Sponsored Content
Top Forums Shell Programming and Scripting how to specify start and stop of a search string Post 302657995 by jeepguy on Monday 18th of June 2012 02:46:59 PM
Old 06-18-2012
I figured it out by tweaking the code you gave me.
I changed the [a-z] to be the beginning of the text I want.
Maybe that was your intent ?

Anyway, it works now.
Thank you very much.

---------- Post updated at 01:46 PM ---------- Previous update was at 01:45 PM ----------

Here is how I tweaked it

egrep -m1 -o test"\([^)]+\)"

So the extracted string starts with "test(", and pulls everything up to the ")".
This User Gave Thanks to jeepguy For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

Start Stop Apache

I am in the process of reorging my Lawson db. I need to turn off the RMI server...not a problem. However my instructions also state that I must also shutdown my Servlet Container....I believe it is Apache. I have looked in /usr/apache/bin/apachectl What is the command for stopping and... (2 Replies)
Discussion started by: MILLERJ62
2 Replies

2. HP-UX

ypbind start/stop

Hi, How to start or stop ypbind on HP-UX machine. Searched a little but could not find. thanks, (2 Replies)
Discussion started by: jredx
2 Replies

3. Shell Programming and Scripting

Start Stop Restart

I'm wondering how I should make a script that can start, stop, and restart another script. What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH,... (7 Replies)
Discussion started by: Bakes
7 Replies

4. Shell Programming and Scripting

Servers Stop and Start

Hi, Every time i want to stop and start servers using PuTTY,i have to execute 6 to 10 commands every time ,i need shell script(program) for execute those commands in single command.Is it possible plz suggest me. (3 Replies)
Discussion started by: RG18173
3 Replies

5. Shell Programming and Scripting

Servers Start and Stop

HI I am using below code to start and stop servers but it is not working ,how to run the script please suggest me ,if any errors in the script please let me know. #!/bin/bash IMS_START="/Webserver/AppServer/bin/startServer.sh" IMS_STOP="/Webserver/AppServer/bin/stopServer.sh" case "$1" in ... (1 Reply)
Discussion started by: RG18173
1 Replies

6. Solaris

How to start/stop processes

Please anyone tell me In my last interview the HR asks me how to monitor, start,stop & kill the various processes and subprocesses. Please anyone explain me clearly. It's my personal request (3 Replies)
Discussion started by: suneelieg
3 Replies

7. Shell Programming and Scripting

read a string from its end to its start and stop when you find a specific character

How can I do this? Actually I have a file which contains a path e.g. /home/john/Music/hello.mp3 and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/" Is this possible? Thanks, I am sure you'll not disappoint me here! Oh,... (9 Replies)
Discussion started by: hakermania
9 Replies

8. UNIX for Dummies Questions & Answers

Appending a character(#) with string search at the start of the line

Hello, I have been browsing through the forum, but unable to find a solution for my requirement. I need to go through a file and search for /home/users and insert a # symbol at the start /home/users. Example output is #/home/users. Can you please help me with the awk or sed command for... (1 Reply)
Discussion started by: chandu123
1 Replies

9. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

10. Shell Programming and Scripting

Search a String between start and end of a block in a file

Hi, I have a scenario where I want to display the output based on the pattern search between the start and end of a block in a file, we can have multiple start and end blocks in a file. Example give below, we need to search between the start block abc and end block def in a file, after that... (5 Replies)
Discussion started by: G.K.K
5 Replies
MPI_Alloc_mem(3OpenMPI) 												   MPI_Alloc_mem(3OpenMPI)

NAME
MPI_Alloc_mem - Allocates a specified memory segment. SYNTAX
C Syntax #include <mpi.h> int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) Fortran Syntax (see FORTRAN NOTES) INCLUDE 'mpif.h' MPI_ALLOC_MEM(SIZE, INFO, BASEPTR, IERROR) INTEGER INFO, IERROR INTEGER(KIND=MPI_ADDRESS_KIND) SIZE, BASEPTR C++ Syntax #include <mpi.h> void* MPI::Alloc_mem(MPI::Aint size, const MPI::Info& info) INPUT PARAMETERS
size Size of memory segment in bytes (nonnegative integer). info Info argument (handle). OUTPUT PARAMETERS
baseptr Pointer to beginning of memory segment allocated. IERROR Fortran only: Error status (integer). DESCRIPTION
MPI_Alloc_mem allocates size bytes of memory. The starting address of this memory is returned in the variable base. FORTRAN NOTES
There is no portable FORTRAN 77 syntax for using MPI_Alloc_mem. There is no portable Fortran syntax for using pointers returned from MPI_Alloc_mem. However, MPI_Alloc_mem can be used with Sun Fortran compilers. From FORTRAN 77, you can use the following non-standard declarations for the SIZE and BASEPTR arguments: INCLUDE "mpif.h" INTEGER*MPI_ADDRESS_KIND SIZE, BASEPTR From either FORTRAN 77 or Fortran 90, you can use "Cray pointers" for the BASEPTR argument. Cray pointers are described further in the For- tran User's Guide and are supported by many Fortran compilers. For example, INCLUDE "mpif.h" REAL*4 A(100,100) POINTER (BASEPTR, A) INTEGER*MPI_ADDRESS_KIND SIZE SIZE = 4 * 100 * 100 CALL MPI_ALLOC_MEM(SIZE,MPI_INFO_NULL,BASEPTR,IERR) ! use A CALL MPI_FREE_MEM(A, IERR) ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ func- tions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. SEE ALSO
MPI_Free_mem Open MPI 1.2 September 2006 MPI_Alloc_mem(3OpenMPI)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy