Unix/Linux Go Back    


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

Whats wrong with this If statement?

Programming


Tags
linux, programming

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-13-2017   -   Original Discussion by Gevni
Gevni's Unix or Linux Image
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 Unix and Linux 06-13-2017   -   Original Discussion by Gevni
Neo's Unix or Linux Image
Neo Neo is online now Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 11 December 2017, 10:13 AM EST
Location: Asia pacific region
Posts: 14,083
Thanks: 932
Thanked 1,268 Times in 607 Posts
Double posted topic.

Continue here.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 02:22 PM
Whats wrong with this If statement? Gevni UNIX for Beginners Questions & Answers 1 06-13-2017 10:40 AM
Whats wrong with the following Larry_1 Homework & Coursework Questions 1 12-16-2010 03:51 PM
whats wrong with this find statement ? crackthehit007 Shell Programming and Scripting 2 03-26-2009 05:52 AM
tell me whats wrong with this nadman123 Shell Programming and Scripting 1 04-15-2008 12:58 AM



All times are GMT -4. The time now is 11:21 AM.