11-08-2006
xor 2 values in ksh?
i have to xor two variables in ksh. how to do that?
tia,
DN2
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I wrote a small KSH script, in that i am comparing two variables like this
curr_time = date +%h.%m
set_time=23.55
If ];
then
zip the file
fi
The above script is croned to run evey 5(3,8,.......,58) minutes, but it is zipping at 23.03 hours. My intention is at 23.58 .what... (4 Replies)
Discussion started by: nandinisagar
4 Replies
2. Programming
Hi !
How to reset a variable to 0 after a reset value, say 10 using bitwise
XOR.
For example,
int cnt=0;
if(cnt<10)
cnt++;
else
cnt = 0;
How can we achieve this by using XOR only.
thanks, (1 Reply)
Discussion started by: mrgubbala
1 Replies
3. Shell Programming and Scripting
Hi,
I want to get the first two items returned by ps -ef into two variables?
Can anyone please help
Thanks (8 Replies)
Discussion started by: JamesByars
8 Replies
4. Programming
Hi,
I am trying to reverse a string using the following program utilizing the Exclusive OR bit operation:
int main() {
char str = "Quraish";
char *p = str, temp;
char *q = str + strlen(str) - 1;
while ( p != q ) {
if (*p != *q) {
*p ^= *q; *q ^= *p; *p ^= *q;... (1 Reply)
Discussion started by: royalibrahim
1 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to work on the script given below
#!/bin/ksh -x
pfile()
{
echo "$1"
}
touch smp19
echo "Hi" > smp19
result=$(pfile $smp19)
echo $result
As highlighted , when i pass $smp19 as parameter ,it does not display the output.However when i try giving "Hi" instead... (2 Replies)
Discussion started by: Sheema
2 Replies
6. Shell Programming and Scripting
Hi there,
I want to compare 2nd column which are alphanumeric values from each of the 2 files i.e.,lspv_pre.out and lspv_post.out , if found echo some message.
lspv_pre.out
hdisk0 00c39eaa451144dd rootvg active
hdisk1 00c39eaa45223322 ... (3 Replies)
Discussion started by: mbak
3 Replies
7. UNIX for Dummies Questions & Answers
I am aware of truth table for XOR between binary values .
Out of curious in would like to know how XOR works between 2 strings which contain alphabets .
For example A ^ B
How it works internally?
Please help me to understand this
Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies
8. FAQ Submission Queue
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)
Discussion started by: pandeesh
1 Replies
9. UNIX for Dummies Questions & Answers
hi,
i am new to shell programming, can u please tell me how to perform XOr operation of two strings.
i tried to do xor using ^symbol but this doesnt work.
help me with this
Thanks (12 Replies)
Discussion started by: anil_uvce
12 Replies
LEARN ABOUT DEBIAN
slasq4
slasq4.f(3) LAPACK slasq4.f(3)
NAME
slasq4.f -
SYNOPSIS
Functions/Subroutines
subroutine slasq4 (I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, DN1, DN2, TAU, TTYPE, G)
SLASQ4
Function/Subroutine Documentation
subroutine slasq4 (integerI0, integerN0, real, dimension( * )Z, integerPP, integerN0IN, realDMIN, realDMIN1, realDMIN2, realDN, realDN1,
realDN2, realTAU, integerTTYPE, realG)
SLASQ4
Purpose:
SLASQ4 computes an approximation TAU to the smallest eigenvalue
using values of d from the previous transform.
Parameters:
I0
I0 is INTEGER
First index.
N0
N0 is INTEGER
Last index.
Z
Z is REAL array, dimension ( 4*N )
Z holds the qd array.
PP
PP is INTEGER
PP=0 for ping, PP=1 for pong.
N0IN
N0IN is INTEGER
The value of N0 at start of EIGTEST.
DMIN
DMIN is REAL
Minimum value of d.
DMIN1
DMIN1 is REAL
Minimum value of d, excluding D( N0 ).
DMIN2
DMIN2 is REAL
Minimum value of d, excluding D( N0 ) and D( N0-1 ).
DN
DN is REAL
d(N)
DN1
DN1 is REAL
d(N-1)
DN2
DN2 is REAL
d(N-2)
TAU
TAU is REAL
This is the shift.
TTYPE
TTYPE is INTEGER
Shift type.
G
G is REAL
G is passed as an argument in order to save its value between
calls to SLASQ4.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Further Details:
CNST1 = 9/16
Definition at line 151 of file slasq4.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 slasq4.f(3)