Sponsored Content
Full Discussion: Bash arithmetic issue
Top Forums Shell Programming and Scripting Bash arithmetic issue Post 302977828 by RudiC on Friday 22nd of July 2016 09:17:03 AM
Old 07-22-2016
Why stupid? It't explainable and logic.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help is manipulating a file with some arithmetic operations using bash script

Friends, I have a file with contents like: interface Serial0/4/0/0/1/1/1/1:0 encapsulation mfr multilink group 101 Now I need to manipulate the file in such a way that to all the numbers less than 163, 63 gets added and to all numbers greater than 163, 63 gets deducted.(The numbers... (2 Replies)
Discussion started by: shrijith1
2 Replies

2. Shell Programming and Scripting

Bash Calculator issue

Hello, I'm relatively new to using bc so I could use some help. In this script im working on I want to have the bc function to calculate float numbers for imagemagicks convert charcoal. Below is what I'm talking about. There are no syntax errors but when it outputs the users frames for example 0-10... (2 Replies)
Discussion started by: jsells20
2 Replies

3. Shell Programming and Scripting

Arithmetic operations in bash,ksh,sh

Guys, The below expression is valid in which shells (sh,ksh,bash,csh)? VAR1=2 VAR2=$(($VAR1 -2)) Thanks (1 Reply)
Discussion started by: rprajendran
1 Replies

4. Shell Programming and Scripting

bash in perl issue

I use the following shell script in bash and it works fine. It returns 1 # cat /etc/httpd/conf/res.txt maldet(24444): {scan} scan completed on eicar_com.zip: files 1, malware hits 1, cleaned hits 0 # if ]; then echo 0 > /etc/httpd/conf/malflag; else echo 1 > /etc/httpd/conf/malflag;... (2 Replies)
Discussion started by: anilcliff
2 Replies

5. Shell Programming and Scripting

bash ls command file issue

ls -l /md01/EL/MarketData/inbound/ststr/INVENTORY* |tail -5 |awk '{ print $5,$6,$7,$8,$9 }'If I run the above from the command line the output to md_email is formatted correctly as 78213497 May 1 12:50 /md01/EL/MarketData/inbound/ststr/INVENTORY.20120430.PINESTREET.CSV.done 77904740 May 2... (3 Replies)
Discussion started by: smenago
3 Replies

6. Shell Programming and Scripting

Arithmetic calculations in bash file

I have 2 numbers xmin = 0.369000018 xmax = 0.569000006 and want to calculate (xmax- xmin) / 5.0 I have tried using $(( )) but is always giving an error (8 Replies)
Discussion started by: kristinu
8 Replies

7. Shell Programming and Scripting

Array Issue In Bash

Hi, I have the following code which is giving error mentioned below. Please can you support on this. Also suggest how can we access all the items against single vasservicename in circlename array,i.e, vasservicename say MTSTV will be available to all circles which are mentioned in the array... (2 Replies)
Discussion started by: siramitsharma
2 Replies

8. Shell Programming and Scripting

Arithmetic on a Float in bash

I am using bash I have a script that takes a number, i.e. 85.152, which is always a non integer and essentially tries to get that number to be a multiple of 10. My code is as follows: number=85.152 A=${number%.*} #Converts float to integer typeset -i B=$(((A-20)/10)) #subtracting 20 is... (12 Replies)
Discussion started by: prodigious8
12 Replies

9. UNIX for Beginners Questions & Answers

Compare bash arrays issue

Hello everyone, I need help comparing 2 arrays. the first array is static; the second array is not .. array1=( "macOS Mojave" "iTunes" ) cd /Volumes array2=( * ) # output of array2 macOS Mojave iTunes Mac me The problem occurs when I compare the arrays with the following code - ... (6 Replies)
Discussion started by: trexthurman
6 Replies

10. Shell Programming and Scripting

Arithmetic with bash

I need to divide the number of white spaces by total number of characters in a file using bash. I am able to get the number of white spaces correctly using: tr -cd < afile | wc -c I am also able to get the total number of characters using: wc -c afile How do I divide the first... (2 Replies)
Discussion started by: ngabrani
2 Replies
cf(1)																	     cf(1)

   NAME
       cf - Confluence compiler

   SYNOPSIS
	   cf [options] [file] [arguments]

   DESCRIPTION
       Confluence  is  a functional programming language for reactive system design, including digital logic systems (ASIC, FPGA) and control ori-
       ented hard real-time software.

       The Confluence compiler (cf) translates a Confluence description into Verilog and VHDL (for digital logic synthesis), C (for simulation and
       software targets), and NuSMV (for formal verification, via model checking).

   OPTIONS
       -h OR -help Prints this information then exits.

       -b filename OR -base_env filename

	      Sets the base environment for the compilation.
		     Overrides the CF_ENV

	      environment variable.
		     If CF_ENV not defined and -base_env option not set, the base environment defaults to /usr/share/confluence/base.cf.

       -e integer OR -error_limit integer

	      Sets the maximum number of reported errors.
		     A negative number reports all errors.

       -c OR -compile_only Parses and compiles, but does not evaluate a program.

       -o name

	      Sets the output file name.
		     Default is out.fnf.

       -test Run the built in unit tests.

   ENVIRONMENT VARIABLES
       CF_ENV A filename that specifies the base environment (commonly base.cf).

       CF_LIB The directory location of the Confluence standard library (optional).

   VERSION
       0.10.6

   AUTHOR
       Tom Hawkins (tomahawkins@yahoo.com)

   SEE ALSO
       http://www.confluent.org/

   COPYRIGHT
       Copyright (C) 2003-2005 Tom Hawkins

								  31 January 2010							     cf(1)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy