Sponsored Content
Top Forums Shell Programming and Scripting bc giving error: (standard_in) 2: parse error Post 302442286 by agn on Wednesday 4th of August 2010 01:30:31 AM
Old 08-04-2010
Instead of

Code:
if [ $(echo "${ratio} > ${THRESHOLD}" | bc ) -eq 1 ]; then

try

Code:
if [ $ratio -le $THRESHOLD ]; then

The reason your shell is complaining is because '$(echo "${ratio} > ${THRESHOLD}" | bc' is throwing an error.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

script giving error

Hi All, i have an small issue... echo " " eval x=$@ export x=`echo $x` echo $x ssh user@ipadrss; cd /mbbv/home/; cd /mbbv/home/orange/orange/ echo pwd bash samplescript.sh $x above is my script which will triger from server A and will connect to server B for some... (2 Replies)
Discussion started by: Shahul
2 Replies

2. Linux

acroread command giving error

Hi, When I run the command acroread it is giving error ERROR: Cannot find installation directory. When I look at /usr/local/Adobe/Acrobat7.0/bin/ an exicutable file named acroread is there. When i run ./acroread from that directory it is working . What can i do so that I can give... (3 Replies)
Discussion started by: iamjayanth
3 Replies

3. UNIX and Linux Applications

apt-get install giving error

Hello when i am giving a command apt-get install I am getting error as below: " apt-get: error while loading shared libraries: libapt-pkg-libc6.3-6.so.3.11: cannot open shared object file: No such file or directory " can u suggest what to do. https://www.unix.com/images/misc/progress.gif... (1 Reply)
Discussion started by: pradeepreddy
1 Replies

4. BSD

Xarchiver giving error messages

I have FreeBSD installed with Xarchiver and when extracting files through the file manager ("Extract here..." option) the following error pops up: tar: unrecognized option `--overwrite' Perhaps this is a known error and is there a way to solve it? (10 Replies)
Discussion started by: figaro
10 Replies

5. Shell Programming and Scripting

(standard_in) 1: parse error

Hi all, Could someone please to tell me when do we exactly get the below error and how to get rid of it. I am unable to trace the error. (standard_in) 1: parse error Thanks in advance !! (4 Replies)
Discussion started by: sparks
4 Replies

6. AIX

multipath giving error

Hi, # lspath Missing hdisk0 fscsi0 Missing hdisk1 fscsi0 Missing hdisk2 fscsi0 Missing hdisk3 fscsi0 Missing hdisk4 fscsi0 Missing hdisk5 fscsi0 Missing hdisk6 fscsi0 Missing hdisk7 fscsi0 Missing hdisk8 fscsi0 Missing hdisk9 fscsi0 Missing hdisk10 fscsi0 Missing hdisk11... (2 Replies)
Discussion started by: JATA01
2 Replies

7. Shell Programming and Scripting

(standard_in) 1: parse error

Hi, I am trying to make a script that tries to compare two values and print if one is greater than another. It seems to return a (standard_in) 1: parse error at times. #!/bin/sh a= awk '{print $1}' file1.txt b= awk '{print $1}' file2.txt c= awk '{print $1}' file3.txt x= awk '{print... (5 Replies)
Discussion started by: jamie_123
5 Replies

8. Shell Programming and Scripting

If condition giving syntax error. Need help.

Hi, I have an if condition on executing it is giving syntax error as below: -------------------------------------------------------------------------------------- line 61: syntax error in conditional expression ./play_test.sh: line 61: syntax error near `]' ./play_test.sh: line 61: ` if... (2 Replies)
Discussion started by: ramki067
2 Replies

9. Shell Programming and Scripting

Standard_in error

# echo '6.5 < 2.7 ' |bc 0 # echo '4.8.5 > 4.8.4' |bc (standard_in) 1: syntax error (standard_in) 1: syntax error ---------------------------------------------------------- FILESET_A_VER_CHK2=4.8.5 FILESET_R_NAME_CHK2=4.8.5 if ] ; then ## echo "Fileset is higher " ... (2 Replies)
Discussion started by: Mathew_paul
2 Replies

10. Shell Programming and Scripting

(standard_in)1:syntax error using bc with Cron

I created a shell script to record server temperature. When I manually run script it works fine with no error message. But when I create a cron job, my script fails with error message (standard_in)1:syntax error. I figured out the bc utility is causing the error message. Below is my script. ... (7 Replies)
Discussion started by: SysAdminRialto
7 Replies
GLUPERSPECTIVE(3G)														GLUPERSPECTIVE(3G)

NAME
gluPerspective - set up a perspective projection matrix C SPECIFICATION
void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar ) PARAMETERS
fovy Specifies the field of view angle, in degrees, in the y direction. aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). zNear Specifies the distance from the viewer to the near clipping plane (always positive). zFar Specifies the distance from the viewer to the far clipping plane (always positive). DESCRIPTION
gluPerspective specifies a viewing frustum into the world coordinate system. In general, the aspect ratio in gluPerspective should match the aspect ratio of the associated viewport. For example, aspect = 2.0 means the viewer's angle of view is twice as wide in x as it is in y. If the viewport is twice as wide as it is tall, it displays the image without distortion. The matrix generated by gluPerspective is multipled by the current matrix, just as if glMultMatrix were called with the generated matrix. To load the perspective matrix onto the current matrix stack instead, precede the call to gluPerspective with a call to glLoadIdentity. Given f defined as follows: f = cotangent(fovy/2) The generated matrix is f ------------ 0 0 0 aspect 0 f 0 0 zFar+zNear 2*zFar*zNear 0 0 ---------- ------------ zNear-zFar zNear-zFar 0 0 -1 0 NOTES
Depth buffer precision is affected by the values specified for zNear and zFar. The greater the ratio of zFar to zNear is, the less effec- tive the depth buffer will be at distinguishing between surfaces that are near each other. If r = zFar/zNear roughly log2(r) bits of depth buffer precision are lost. Because r approaches infinity as zNear approaches 0, zNear must never be set to 0. SEE ALSO
glFrustum, glLoadIdentity, glMultMatrix, gluOrtho2D GLUPERSPECTIVE(3G)
All times are GMT -4. The time now is 10:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy