Negative testing in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Negative testing in unix
# 1  
Old 09-16-2011
Negative testing in unix

how can we do negative testing in unix ?
# 2  
Old 09-16-2011
Do you mean like this?
Code:
if ! false; then
  echo not false
fi

# 3  
Old 09-18-2011
Or perhaps variables less than zero:

Code:
VAL=-2
[ $VAL -lt 0 ] && echo "Var is Negative"

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Bits in Negative

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

2. Shell Programming and Scripting

Negative testing in Unix

How to do Negative testing in Unix ?? Please reply asap. Regards Esha (0 Replies)
Discussion started by: eshalife
0 Replies

3. UNIX for Dummies Questions & Answers

Negative testing in Unix

How to do Negative testing in Unix ?? Please reply asap. Regards Esha (0 Replies)
Discussion started by: eshalife
0 Replies

4. Shell Programming and Scripting

change value to negative

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. UNIX for Dummies Questions & Answers

Unix Performance testing - training content

Hi Everyone, My company is involved in performing performance testing and now they want to perform couple of training related with executing those tests on the servers based on Unix sytems. And I have to provide them draft of the content for those trainings. I think this kind of training... (2 Replies)
Discussion started by: Bartuss
2 Replies

6. Shell Programming and Scripting

Stress testing php files at Unix/Linux Command line

Hi, Your great help is very appreciated. I am looking for any Unix command or tool for doing Stress/Load test of php files at command prompt. I tried torture.pl but it is not working after20 concurrent threads/users. as it is very urgent for me..please suggest ur ideas asap. thanks (5 Replies)
Discussion started by: Malleswari
5 Replies

7. Programming

Negative Offset

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

8. UNIX for Dummies Questions & Answers

negative permissions

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
Login or Register to Ask a Question