02-18-2009
in the same prgm echo -e "\n\n `ls -lt /root/COMM/LOGS/eds/20081025 | tr -s " " | cut -f 6,7,8,9 -d " "`" >> $MFILE
is not working properly in KSH ... i tried so many times... can any one help me ?
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Working on AIX using the following for loop.
for a in `find /edi/iTracTEST/sessions -name nohup.out -print`
do
echo $a
done
On the command line it works fine, but insert the code in a file and then running it, it does not want to work. I get the following back.
' is not... (3 Replies)
Discussion started by: hugow
3 Replies
2. Solaris
Hi,
Iam trying to add a while loop in my script in the below way which gets value from count file and checks if its not equal to 0.If yes then it shld echo me a message.
while //count file has some number other than 0
do
echo "count is not zero"
done
But iam getting this error:... (5 Replies)
Discussion started by: jyothi_wipro
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I get the following output
98 -1
98 0
./get_AB04-time: line 79: ((: i< && 0 !=7 : syntax error: operand expected (error token is "&& 0 !=7 ")
I have this part of code. Line 79 is the line of the for loop.
echo ${OCCURRENCE} $i_START
CASE=0;
i_END=${i_START}... (4 Replies)
Discussion started by: f_o_555
4 Replies
4. Shell Programming and Scripting
Hello All,
I am having a problem with an “if loop” within a “while loop” in my Korn Shell program. The basic concept of the program is that it searches for the existence of a series of load files in a load directory, and once it finds one of these files, it begins the following process:
· Creates... (4 Replies)
Discussion started by: jonesdk5
4 Replies
5. Shell Programming and Scripting
the program just prints all the command line arguments
Getting error in the program
error
./hellow: line 13: 0: command not found
./hellow: line 13: 0: command not found
below is the program
#!/bin/bash
num=$#
echo $num
if
then
echo "No arguments are passed ."
else
... (7 Replies)
Discussion started by: BHASKARREDDY006
7 Replies
6. Shell Programming and Scripting
I have a file Table.out having table name like this
Table_Emp
Table_Exp
Table_Fcr
To show first 10 rows .. I' wrtng a script like this ..
#!/bin/ksh
cat /tmp/table.out|while read -r table vbar1
do
<connect to db>
then
select * from $table limit 10; > /tmp/1.out
done
... (3 Replies)
Discussion started by: netdbaind
3 Replies
7. Shell Programming and Scripting
Hi All,
while executing this code ,I'm gettign below Error
if_test: line 3:
#!/bin/bash
if ;
then
echo "this is aginity;"
elif ;
then
echo "this is informatica;"
fi
exit (3 Replies)
Discussion started by: netdbaind
3 Replies
8. Shell Programming and Scripting
This is my first ever bash script. What i wish to achieve is to find all files in current directory except the script file and count lines in each found file. Some thing seems to be wrong with the if statement :confused: Please help why it does not work? and maybe you have some ideas how to improve... (3 Replies)
Discussion started by: chinababy
3 Replies
9. Shell Programming and Scripting
I was trying to implement a nested for do loop to run a perl script.
for i in 1 10 50
do
for j in 2 12 55
do
perl script.pl "$i" "$i" "$j"
done
done
when I implemented it within a shell script, i got the output, but every time j value will 55, or basically the last value of j in... (10 Replies)
Discussion started by: Kanja
10 Replies
10. UNIX for Beginners Questions & Answers
There are two files abc_123.dat and abc_345.dat if at least one file exists then enter into the loop and remove file and exit.
In first iteration, deleting files successfully
but "else" statement executing after deleting files."else" should execute only if there is no file in the directory.... (1 Reply)
Discussion started by: Rajesh123
1 Replies
LEARN ABOUT OSX
mpi_bcast
MPI_Bcast(3OpenMPI) MPI_Bcast(3OpenMPI)
NAME
MPI_Bcast - Broadcasts a message from the process with rank root to all other processes of the group.
SYNTAX
C Syntax
#include <mpi.h>
int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype,
int root, MPI_Comm comm)
Fortran Syntax
INCLUDE 'mpif.h'
MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR)
<type> BUFFER(*)
INTEGER COUNT, DATATYPE, ROOT, COMM, IERROR
C++ Syntax
#include <mpi.h>
void MPI::Comm::Bcast(void* buffer, int count,
const MPI::Datatype& datatype, int root) const = 0
INPUT
/OUTPUT PARAMETERS
buffer Starting address of buffer (choice).
count Number of entries in buffer (integer).
datatype Data type of buffer (handle).
root Rank of broadcast root (integer).
comm Communicator (handle).
OUTPUT PARAMETER
IERROR Fortran only: Error status (integer).
DESCRIPTION
MPI_Bcast broadcasts a message from the process with rank root to all processes of the group, itself included. It is called by all members
of group using the same arguments for comm, root. On return, the contents of root's communication buffer has been copied to all processes.
General, derived datatypes are allowed for datatype. The type signature of count, datatype on any process must be equal to the type signa-
ture of count, datatype at the root. This implies that the amount of data sent must be equal to the amount received, pairwise between each
process and the root. MPI_Bcast and all other data-movement collective routines make this restriction. Distinct type maps between sender
and receiver are still allowed.
Example: Broadcast 100 ints from process 0 to every process in the group.
MPI_Comm comm;
int array[100];
int root=0;
...
MPI_Bcast( array, 100, MPI_INT, root, comm);
As in many of our sample code fragments, we assume that some of the variables (such as comm in the example above) have been assigned appro-
priate values.
WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
When the communicator is an inter-communicator, the root process in the first group broadcasts data to all the processes in the second
group. The first group defines the root process. That process uses MPI_ROOT as the value of its root argument. The remaining processes
use MPI_PROC_NULL as the value of their root argument. All processes in the second group use the rank of that root process in the first
group as the value of their root argument. The receive buffer arguments of the processes in the second group must be consistent with the
send buffer argument of the root process in the first group.
NOTES
This function does not support the in-place option.
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.
Open MPI 1.2 September 2006 MPI_Bcast(3OpenMPI)