9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I have requirement need to sum the value, the logic is if the value is negative then time -1, I tried below two ways. one is failed, another one doesn't work.
awk -F"," '{if($8< 0 $8*-1 else $8) sum+=$8}{print sum, $8} END{printf("%.2f\n",sum)}'
awk -F","... (4 Replies)
Discussion started by: ken6503
4 Replies
2. Post Here to Contact Site Administrators and Moderators
Hi All,
I have received a notification that I have posted a question double times.
But I have not done all this intentionally. I have just joined this site and was not aware of the rules. Also I have my bits in negative.
what does that mean.
Thanks (1 Reply)
Discussion started by: Palak Sharma
1 Replies
3. Shell Programming and Scripting
how can we do negative testing in unix ? (2 Replies)
Discussion started by: eshalife
2 Replies
4. Shell Programming and Scripting
How to change value in column 5 to negative based on value in column 2 ?
Example: For all records with A in column 2 change value in column 5 to negative.
file
Code:
1234~A~b~c~10~e~f~g~h~09/10/09
1234~A~b~c~75~e~f~g~h~11/12/10
1234~A~b~c~40~e~f~g~h~12/06/10
5678~B~b~c~2~e~f~g~h~01/11/11... (4 Replies)
Discussion started by: sigh2010
4 Replies
5. Shell Programming and Scripting
ValA=-29344
if ; then
echo "NEGATIVE"
else
echo "POSITIVE"
fi
Can someone please tell me how else they would go about doing the above?
When i do it, i get errors such as: (10 Replies)
Discussion started by: SkySmart
10 Replies
6. Shell Programming and Scripting
Hello,
I need help to write a script to do the following:
1) read the following file vol_check.out
2) report any negative value with host and volume name
vol_check.out file contents:
---------------------------------- prod_filer1 ---------------------------------... (2 Replies)
Discussion started by: za_7565
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Can anyone explain what is going on here:
michael-browns-powerbook-g4-15:~ msb65$ start=-1
michael-browns-powerbook-g4-15:~ msb65$ stop=1
michael-browns-powerbook-g4-15:~ msb65$ if ; then echo hello; fi
-bash: ; then echo hello; fi
hello
Are you not allowed to compare negative... (6 Replies)
Discussion started by: msb65
6 Replies
8. Programming
Function: int fcntl(int fd, int cmd, struct flock * lock)
Data Type: struct flock
This structure is used with the fcntl function to describe a file lock. It has these members:
off_t l_start
This specifies the offset of the start of the region to which the lock applies, and... (1 Reply)
Discussion started by: DNAx86
1 Replies
9. UNIX for Dummies Questions & Answers
Hi.
I want to know how can I negate a write permission for a file to an expecific user when that user have that permission becouse he belongs to a group what have a write permission for the file. (4 Replies)
Discussion started by: sickoboy
4 Replies
atan2d(3M) atan2d(3M)
NAME
atan2d(), atan2df(), atan2dl(), atan2dw(), atan2dq() - degree-valued arctangent-and-quadrant functions
SYNOPSIS
HP Integrity Server Only
DESCRIPTION
is a degree-valued version of the function. It returns the arctangent of y/x, in the range -180 to 180, using the signs of both arguments
to determine the quadrant of the return value.
is a version of it takes arguments and returns a result.
Integrity Server Only
is a version of it takes arguments and returns a result.
is an version of it takes arguments and returns an result.
is equivalent to on HP-UX systems.
USAGE
To use these functions compile either with the default option or with the and the options.
To use (for Integrity servers) or compile also with the option.
To use any of these functions, make sure your program includes and link in the math library by specifying on the compiler or linker command
line.
For more information, see the at the following site:
RETURN VALUE
If y and x is -0,
If y and x is +0,
If y and x is less than zero,
If y and x is greater than zero, returns
If y is less than zero and x is zero, returns -90.
If y is greater than zero and x is zero, returns 90.
If y is greater than zero and x is -INFINITY, returns 180.
If y is less than zero and x is -INFINITY, returns -180.
If y is greater than zero and x is INFINITY, returns +0.
If y is less than zero and x is INFINITY, returns -0.
If y and x is finite, returns
If y and x is -INFINITY, returns
If y and x is +INFINITY, returns
If x or y is NaN, returns NaN.
ERRORS
No errors are defined.
SEE ALSO
acosd(3M), asind(3M), atand(3M), atan2(3M), cosd(3M), sind(3M), tand(3M), math(5).
STANDARDS CONFORMANCE
These functions are not specified by any standard.
atan2d(3M)