Programming

Post questions about C, C++, Java, SQL, and other programming languages here.

Whats wrong with this If statement?


👤 Login to reply

 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-13-2017
Gevni Gevni is offline
Registered User
 
Join Date: Jun 2017
Last Activity: 13 June 2017, 10:14 AM EDT
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Whats wrong with this If statement?

Hi
I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement?

Code:
Code:
if [$DB_SIZE%$kk==0] && [$DB_SIZE/$kk<=$M] && [$DB_SIZE/$kk >= $divide]
then

			fector=$kk;
			divide=$DB_SIZE/$kk;
			echo "factor value:$fector"
			echo"divide value:$divide"
			

fi

line 1: [1024%2==0]: command not found

Sponsored Links
    #2  
Old 06-13-2017
Neo's Unix or Linux Image
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 19 July 2018, 1:43 PM EDT
Location: Asia pacific region
Posts: 14,572
Thanks: 1,032
Thanked 1,437 Times in 697 Posts
Double posted topic.

Continue here.
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Whats wrong with this If statement? Gevni Shell Programming and Scripting 4 06-13-2017 01:22 PM
Whats wrong with this If statement? Gevni UNIX for Beginners Questions & Answers 1 06-13-2017 09:40 AM
Whats wrong with the following Larry_1 Homework & Coursework Questions 1 12-16-2010 02:51 PM
whats wrong with this find statement ? crackthehit007 Shell Programming and Scripting 2 03-26-2009 04:52 AM
tell me whats wrong with this nadman123 Shell Programming and Scripting 1 04-14-2008 11:58 PM



All times are GMT -4. The time now is 06:49 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?