The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need AWk To parse XML logs amit1_x Shell Programming and Scripting 0 05-08-2008 05:46 AM
Parse mirusnet Shell Programming and Scripting 1 01-23-2008 03:49 PM
parse xml bin-doph High Level Programming 5 03-15-2004 08:19 AM
How to parse.. natter Shell Programming and Scripting 8 05-22-2003 06:11 AM
Parse nguda Shell Programming and Scripting 7 05-16-2002 06:10 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-29-2007
Registered User
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
Parse error

hi,
onsider the followinf two lines

J="$(scriptbc -p 8 $I / \(12 \* 100 \) )"
N="$(( $L * 12 ))"

In the first line I put \ before * like \* and its working fine.
But in the second line if put \ before * i am getting parse error.
What might be the reason?Any idea pls.
cheers
RRK
Reply With Quote
Forum Sponsor
  #2  
Old 06-29-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
In the first case, you are running a subshell ( $() ) and need to escape the * to prevent the shell from interpreting it. The second line is simple multiplication in ksh/bash ( $(()) ). You don't need to escape the * in that case.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0