08-10-2012
It's considering [0-9] and [A-Z] as separate ranges. So what you're asking for is actually a number, followed by one to three letters.
Try [0-9A-Z]
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
MSG="THERE WERE XX RECORDS IN ERROR TABLE,AAAA, WHEN LOADING THE BBBB TABLE WITH EXTRACT FROM CCCC INTO TABLES FOR , DATABASE DDDD."
echo "$MSG" > /tmp/mplanmsg.$$.out
I wan to replace XX with the content in $recordXX
cat /tmp/mplanmsg.$$.out|sed 's/XX/\$recordXX/g'| sed... (3 Replies)
Discussion started by: leemjesse
3 Replies
2. Shell Programming and Scripting
trying to remove the portion in red:
Data:
mds_ar/bin/uedw92wp.ksh: $AI_SQL/wkly.sql
mds_ar/bin/uedw92wp.ksh: $EDW_TMP/wkly.sql
output to be:
mds_ar/bin/uedw92wp.ksh: wkly.sql
mds_ar/bin/uedw92wp.ksh: wkly.sql
SED i'm trying to use:
sed 's/:+\//: /g' input_file.dat >... (11 Replies)
Discussion started by: danmauer
11 Replies
3. Shell Programming and Scripting
Hi,
I have a file which contains a word like ravi and ravi30.
i want to replace only the word ravi with xxx for that i am using the below sed command
sed -e 's/ravi/xxx/g' .
but the above command out put is xxx and xxx30 but i dont need to change ravi30
please guide me how to proceed.... (4 Replies)
Discussion started by: ravi_rn
4 Replies
4. Shell Programming and Scripting
All,
I have the following file:
--------------------------------------
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services... (2 Replies)
Discussion started by: RobertBerrie
2 Replies
5. Shell Programming and Scripting
Hi folks,
Lets say I have the following text file:
name, lastname, 1234, name.lastname@test.com
name1, lastname1, name2.lastname2@test.com, 2345
name, 3456, lastname, name3.lastname3@test.com
4567, name, lastname, name4.lastname4@test.com
I now need the following output:
1234... (5 Replies)
Discussion started by: domi55
5 Replies
6. Shell Programming and Scripting
Hello,
I am trying to covert a for statement into a single awk script and I've got everything but one part.
I also need to execute an external script when "not found", how can I do that ?
for TXT in `find debugme -name "*.txt"` ;do
FPATH=`echo $TXT | sed 's/\(.*\)\/\(.*\)/\1/'`
how... (7 Replies)
Discussion started by: TehOne
7 Replies
7. UNIX for Dummies Questions & Answers
why does sed 's/.* //' show the last word in a line
and
sed 's/ .*//' show the first word in a line? How is that blank space before or after the ".*" being interpreted in the regex?
i would think the first example would delete the first word and the next example would delete the second... (1 Reply)
Discussion started by: glev2005
1 Replies
8. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
9. Shell Programming and Scripting
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
8 Replies
10. Shell Programming and Scripting
HI, I have a file:
listenerport:
- 1521
- 10520
- 10521
- 10522
- 10523
instances:
listenerport:
listenerport:
- 1521
- 10540
- 10541
- 10542
- 10543
instances:
... (5 Replies)
Discussion started by: netbanker
5 Replies
LEARN ABOUT OSX
mpi_group_range_incl
MPI_Group_range_incl(3OpenMPI) MPI_Group_range_incl(3OpenMPI)
NAME
MPI_Group_range_incl - Creates a new group from ranges of ranks in an existing group.
SYNTAX
C Syntax
#include <mpi.h>
int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
MPI_Group *newgroup)
Fortran Syntax
INCLUDE 'mpif.h'
MPI_GROUP_RANGE_INCL(GROUP, N, RANGES, NEWGROUP, IERROR)
INTEGER GROUP, N, RANGES(3,*), NEWGROUP, IERROR
C++ Syntax
#include <mpi.h>
Group Group::Range_incl(int n, const int ranges[][3]) const
INPUT PARAMETERS
group Group (handle).
n Number of triplets in array ranges (integer).
ranges A one-dimensional array of integer triplets, of the form (first rank, last rank, stride) indicating ranks in group or processes
to be included in newgroup.
OUTPUT PARAMETERS
newgroup New group derived from above, in the order defined by ranges (handle).
IERROR Fortran only: Error status (integer).
DESCRIPTION
If ranges consist of the triplets
(first1, last1, stride1), ..., (firstn, lastn, striden)
then newgroup consists of the sequence of processes in group with ranks
last(1)-first(1)
first(1), first(1) + stride(1),..., first(1) + ---------------- stride(1),...
stride(1)
last(n)-first(n)
first(n), first(n) + stride(n),..., first(n) + ---------------- stride(n).
stride(n)
Each computed rank must be a valid rank in group and all computed ranks must be distinct, or else the program is erroneous. Note that we
may have first(i) > last(i), and stride(i) may be negative, but cannot be zero.
The functionality of this routine is specified to be equivalent to expanding the array of ranges to an array of the included ranks and
passing the resulting array of ranks and other arguments to MPI_Group_incl. A call to MPI_Group_incl is equivalent to a call to
MPI_Group_range_incl with each rank i in ranks replaced by the triplet (i,i,1) in the argument ranges.
NOTE
This implementation does not currently check to see that the list of ranges to include are valid ranks in the group.
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_Group_incl
MPI_Group_free
Open MPI 1.2 September 2006 MPI_Group_range_incl(3OpenMPI)