Sponsored Content
Full Discussion: (standard_in) 1: parse error
Top Forums Shell Programming and Scripting (standard_in) 1: parse error Post 302436485 by Scott on Monday 12th of July 2010 07:00:51 AM
Old 07-12-2010
Hi.

It's the kind of error that bc gives you if, for example, you have an undeclared variable, or passing something to it that it doesn't understand:

Code:
$ echo "scale=1; $X * 3" | bc
(standard_in) 1: parse error

$ echo "scale=3; x 3" | bc
(standard_in) 1: parse error

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse

Does anybody know how do we parse a file (ex. SIF file) into a delimited text file in UNIX? (7 Replies)
Discussion started by: nguda
7 Replies

2. UNIX for Advanced & Expert Users

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 (1 Reply)
Discussion started by: ravi raj kumar
1 Replies

3. Shell Programming and Scripting

Parse

I need a script that will always return an engine of table, which not depends on the table structure. I need it to be done exactly from the "show create table ..." statement. If there is a easiest way, except "show table status", please write. mysql -u root db -sBe "show create table... (1 Reply)
Discussion started by: mirusnet
1 Replies

4. Shell Programming and Scripting

Perl parse error

Hello there, I em executing the following command in a perl script to append "\0" to the end of every line in a file: ###command start my $cmd = qx{"C:\\gawk" '{print $0 "\\\0"}' C:\file.txt > C:\file_1.txt}; ###command end But i get the following error: ###error meaasge start... (2 Replies)
Discussion started by: nmattam
2 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. Shell Programming and Scripting

intermittent bc parse error

Thought I had this worked out, and the equations work fine on their own. What I have is an if statement that checks the raw size of a folder. Smaller than a certain threshold and it returns a value in MB format, otherwise it returns it in GBs. Yes, I know that df and du return human readable... (3 Replies)
Discussion started by: reid
3 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

Parse

Attached file is parsed so that only the three columns result. DACH1 occurs 34 times with an average of 0.881541 NEB occurs 159 times with an average of 0.837628 LTBP1 occurs 46 times with an average of 0.748722 parse result: output.txt (the text is removed and the xxx is seperated in a... (6 Replies)
Discussion started by: cmccabe
6 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
nsd-checkconf(8)                                                    nsd 3.2.12                                                    nsd-checkconf(8)

NAME
nsd-checkconf - NSD configuration file checker. SYNOPSIS
nsd-checkconf [-v] [-h] [-o option] [-z zonename] [-s keyname] configfile DESCRIPTION
nsd-checkconf reads a configuration file. It prints parse errors to standard error, and performs additional checks on the contents. The configfile format is described in nsd.conf(5). The utility of this program is to check a config file for errors before using it in nsd(8) or zonec(8). This program can also be used for shell scripts to access the nsd config file, using the -o and -z options. OPTIONS
-v After reading print the options to standard output in configfile format. Without this option, only success or parse errors are reported. -h Print usage help information and exit. -o option Return only this option from the config file. This option can to be used in conjunction with the -z option. The special value zones prints out a list of configured zones. This option is primarily used by nsdc to parse the config file from the shell. If the -z option is given, but the -o option is not given, nothing is printed. -s keyname Prints the key secret (base64 blob) configured for this key in the config file. Used to help shell scripts parse the config file. -z zonename Return the option specified with -o for zone 'zonename'. If this option is not given, the server section of the config file is used. This option is primarily used by nsdc to parse the con- fig file from the shell. The -o, -s and -z option print configfile options to standard output. FILES
/etc/nsd3/nsd.conf default NSD configuration file SEE ALSO
nsd(8), nsdc(8), nsd.conf(5), nsd-notify(8), nsd-patch(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. NLnet Labs jul 19, 2012 nsd-checkconf(8)
All times are GMT -4. The time now is 12:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy