If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Syntax error for a division

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-15-08, 17:09
koganti koganti is offline
Registered User
 
Join Date: Jul 2002
Location: ATL
Posts: 170
Syntax error for a division

What is wrong with the following statement.

totalMB = (($totalU / 1024 ))

I keep getting syntax error
Reply With Quote
  #2 (permalink)  
Old 01-15-08, 17:50
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Remove the spaces and inject a '$' in front of the two '((':
Code:
totalU=4096; totalMB=$(($totalU / 1024 )); echo $totalMB
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 01-17-08, 10:33
smith43017 smith43017 is offline
Registered User
 
Join Date: Sep 2006
Posts: 92
Stolze thank you very much for your valuable inputs
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On