You cannot use bourne shell alone to do that. bash has bitwise operators as builtins.
You will have to resort to another interpreted language like perl, or a compiled language like C, if you cannot switch to bash at all.
c example:
Last edited by jim mcnamara; 11-28-2011 at 11:44 AM..
This User Gave Thanks to jim mcnamara For This Post:
Hi,
Is it possible to use bitwise operators in bit fields?
For example:
typedef struct Mystruct {
unsigned char A :1 ;
unsigned char B :1 ;
} Mystruct;
and assume
struct Mystruct STR_1S, STR_2S, tempSTRS = {0};
then the following line:
tempSTRS = STR_1S & STR_2S;
gives the... (3 Replies)
I am taking an online course on Unix scripting. The topic is Unix arithmetic operators and the lesson is Logical and bitwise operations. It is not clear how much storage space Unix uses to represent integers that are typed. Bitwise negation caused me to question how many bits are used to... (3 Replies)
Hi
Suppose we have these code lines:
#define _IN_USE 0x001 /* set when process slot is in use */
#define _EXITING 0x002 /* set when exit is expected */
#define _REFRESHING 0x004
...
1 main () {
2
3 unsigned r_flags =_REFRESHING;
4
5 if (r_flag &... (3 Replies)
The purpose of this article is revealing the unrevealed parts of the bitwise XOR.
As we aware, the truth table for the XOR operator is :
A B A^B
0 0 0
0 1 1
1 0 1
1 1 0
For example , 1^2 will be calculated as given below:
First the operands... (1 Reply)
please any one can suggest me how to use bitesie || opearator to do this
#initallize a=0 b=0
#condition
if then
a=0
else a=1
fi
#bitwise or opeartion b = a || b
Please view this code tag video for how to use code tags when posting code and data. (3 Replies)
Hello,
I want to compute the bitwise number of matches in pairwise fashion for all columns. The problem is I have 18486955 rows and 750 columns. Please help with code, I believe this will take a lot of time, is there a way of tracking progress?
Input
Org1 Org2 Org3
A A T
A ... (9 Replies)
Discussion started by: ritakadm
9 Replies
LEARN ABOUT DEBIAN
pvm_start_pvmd
START_PVMD(3PVM) PVM Version 3.4 START_PVMD(3PVM)NAME
pvm_start_pvmd - Starts new PVM daemon.
SYNOPSIS
C int info = pvm_start_pvmd( int argc, char **argv, int block )
Fortran call pvmfstartpvmd( args, block, info )
PARAMETERS
argc Number of arguments in argv.
argv An array of arguments to the executable.
args A character string containing the arguments to the executable.
args A character string containing the arguments to the executable.
block Integer specifying whether to block until startup of all hosts complete or return immediately.
info Integer returning the error code.
DESCRIPTION
The routine pvm_start_pvmd starts up a pvmd3 process, the master of a new virtual machine. It returns as soon as the pvmd is started and
ready for work. If the block parameter is nonzero and a hostfile is passed to the pvmd as a parameter, it returns when all hosts marked to
start have been added. pvm_start_pvmd returns zero on success.
If PVM is compiled to allow running more than one pvmd per host, a task calling pvm_start_pvmd before any other pvm functions will connect
to the pvmd that it starts. pvm_start_pvmd sets environment variable PVMSOCK to the address printed by the pvmd as it starts up.
EXAMPLES
C:
static char *argv[] = {
"-d41",
"/u/jones/pvmd_hosts",
};
argc = 2
info = pvm_start_pvmd( argc, argv, block );
Fortran:
CALL PVMFSTART_PVMD( '-d41 /u/jones/pvmd_hosts', BLOCK, INFO )
EXAMPLES
C:
static char *argv[] = {
"-d41",
"/u/jones/pvmd_hosts",
};
argc = 2
info = pvm_start_pvmd( argc, argv, block );
Fortran:
CALL PVMFSTART_PVMD( '-d41 /u/jones/pvmd_hosts', BLOCK, INFO )
ERRORS
The following error conditions can be returned
PvmDupHost
A pvmd is already running.
PvmSysErr
The local pvmd is not responding.
SEE ALSO pvm_addhosts(3PVM), pvmd3(1PVM)pvmd3(1PVM)
11 December, 1995 START_PVMD(3PVM)