Sponsored Content
Full Discussion: Standard_in error
Top Forums Shell Programming and Scripting Standard_in error Post 303000529 by jim mcnamara on Thursday 13th of July 2017 04:16:01 PM
Old 07-13-2017
This is not a clear question, just bc syntax errors. bc gives kind of ancient looking errors back from tty days.

4.8.5 is not a number - not floating point, not an integer.

That series of numbers has to be compared as a string:
Code:
$ a=1.2.3
$ b=1.2.3.0
$ [ "$a" = "$b" ]  || echo 'not equal'
not equal
$ b="1.2.3"
$ [ "$a" = "$b" ] && echo 'equal'
equal

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error: Internal system error: Unable to initialize standard output file

Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message. Error: Internal system error: Unable to initialize standard output file I'm guessing more info might be needed, so let me know. Thanks (2 Replies)
Discussion started by: firkus
2 Replies

2. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

hi there i write one awk script file in shell programing the code is related to dd/mm/yy to month, day year format but i get an error please can anybody help me out in this problem ?????? i give my code here including error awk ` # date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies

3. AIX

nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error

-------------------------------------------------------------------------------- Hello, help me please. I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? : Command : failed stdout: yes stderr: no... (9 Replies)
Discussion started by: astjen
9 Replies

4. 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

5. Shell Programming and Scripting

bc giving error: (standard_in) 2: parse error

Below part of script, is working fine sometimes and gives error sometime. I am doing float operations, checking if x > y. ##########CODE########## THRESHOLD="1.25" ratio=$( echo "scale=2; ${prev}/${current}" | bc ) if ; then split_date=`echo ${line} | cut -d, -f2` fi ... (9 Replies)
Discussion started by: manishma71
9 Replies

6. UNIX for Dummies Questions & Answers

> 5 ")syntax error: operand expected (error token is " error

im kinda new to shell scripting so i need some help i try to run this script and get the error code > 5 ")syntax error: operand expected (error token is " the code for the script is #!/bin/sh # # script to see if the given value is correct # # Define errors ER_AF=86 # Var is... (4 Replies)
Discussion started by: metal005
4 Replies

7. Solaris

Rpcinfo: can't contact portmapper: RPC: Authentication error; why = Failed (unspecified error)

I have two servers with a fresh install of Solaris 11, and having problems when doing rpcinfo between them. There is no firewall involved, so everything should theoretically be getting through. Does anyone have any ideas? I did a lot of Google searches, and haven't found a working solution yet. ... (2 Replies)
Discussion started by: christr
2 Replies

8. 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

9. 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

10. UNIX for Beginners Questions & Answers

Print Error in Console and both Error & Output in Log file - UNIX

I am writing a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. But i am facing the below error. #! /bin/sh errExit () { errMsg=`cat... (1 Reply)
Discussion started by: sarathy_a35
1 Replies
qsort(3C)																 qsort(3C)

NAME
qsort() - quicksort SYNOPSIS
DESCRIPTION
is an implementation of the quicksort algorithm. It sorts a table of data in place. base Pointer to the element at the base of the table. nel Number of elements in the table. size Size of each element in the table. compar Name of the comparison function, which is called with two arguments that point to the elements being compared. The function passed as compar must return an integer less than, equal to, or greater than zero, according to whether its first argument is to be considered less than, equal to, or greater than the second. uses this same return convention (see string(3C)). NOTES
The pointer to the base of the table should be of type pointer-to-element, and cast to type pointer-to-void. The comparison function need not compare every byte; thus, arbitrary data can be contained in the elements in addition to the values being compared. The order in the output of two items which compare as equal is unpredictable. WARNINGS
If size is zero, a divide-by-zero error might be generated. SEE ALSO
sort(1), bsearch(3C), lsearch(3C), string(3C), thread_safety(5). STANDARDS CONFORMANCE
qsort(3C)
All times are GMT -4. The time now is 09:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy