Sponsored Content
Top Forums UNIX for Dummies Questions & Answers input a float data and add them in shell in linux Post 302293983 by atl@mav on Wednesday 4th of March 2009 08:10:57 AM
Old 03-04-2009
Bug hi

hi frnd,

use variable a n b for inputing and use i for output
example use i = $a + $b
echo $i for output
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Assigning a shell variable as a float

I'm confused as to how to handle floating point numbers in shell scripts. Is there a way to convert a number (string) read into a shell variable so that it can be used as a floating point decimal for calculation purposes? Or am I stuck with integrating C or Perl into my script? Ex: --input ... (3 Replies)
Discussion started by: spieterman
3 Replies

2. UNIX for Advanced & Expert Users

Memory allocation for float data type

Dear All, How internally memory allocated when we declare the float data type. how many bytes allocated for decimal and how many bytes for fraction. kindly help me in this regards. (2 Replies)
Discussion started by: rajamohan
2 Replies

3. Shell Programming and Scripting

float input

how to input float data type in bash shell programming in linux? I am new to it so unaware to use the commands plz help me out. thank you. (6 Replies)
Discussion started by: purva
6 Replies

4. Shell Programming and Scripting

how to use data in unix text file as input to an sql query from shell

Hi, I have data in my text file something like this. adams robert ahmed gibbs I want to use this data line by line as input to an sql query which i run by connecting to an oracle database from shell. If you have code for similar scenario , please ehlp. I want the output of the sql query... (7 Replies)
Discussion started by: rdhanek
7 Replies

5. Shell Programming and Scripting

How to add data from 2 input files and save it in 1 output file

Hi, i have 2 input files which are file1.txt and file2.txt. I need to extract data from file1.txt and file2.txt and save it in file3.txt like example below:- File1.txt ID scrap1 Name scrap1 start 1 end 10 ID scrap2 Name scrap2 start 11 end ... (4 Replies)
Discussion started by: redse171
4 Replies

6. Shell Programming and Scripting

Is there a simpler way to validate user input for float?

I'm trying to only read price (FLOAT (i.e 1.10, 3.14, etc etc)) If the input is just an integer, I will add a .00 behind. (i.e 3 becomes 3.00 , 20 becomes 20.00) If the input is without 2 decimal places, I'll add a 0. (i.e 3.1 becomes 3.10) I tried using the below code, it works but I don't... (6 Replies)
Discussion started by: andylbh
6 Replies

7. Shell Programming and Scripting

Standardization of input source data files using shell script

Hi there, I'm a newbie in unix and am fishing for options related to how raw input data files are handled. The scenario, as I'm sure y'all must be very familiar with, is this : we receive upwards of 50 data files in ASCII format from various source systems - now each file has its own structure... (3 Replies)
Discussion started by: Prat Khos
3 Replies

8. UNIX for Dummies Questions & Answers

Inserting shell script input data automatically from a text file

Dear experts, I am new to linux programming. I have a shell script which i should run it on all my samples. I only define input and out put for this script. The inputs are 3 numbers(coordination numbers) which are available in a series of text file. Since i have a lots of samples, it takes a... (5 Replies)
Discussion started by: mohamadreza
5 Replies

9. Shell Programming and Scripting

How to get the shell script to read the .txt file as an input/data?

i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies

10. Shell Programming and Scripting

Linux shell script, search by an input string

So, there is a large file where I have to conduct several search using bash shell scripting. The file is like this: TITLE and AUTHOR ETEXT NO. Aspects of plant life; with special reference to the British flora, 56900 by Robert Lloyd... (1 Reply)
Discussion started by: Philia
1 Replies
wxGraphicsMatrix(3erl)					     Erlang Module Definition					    wxGraphicsMatrix(3erl)

NAME
wxGraphicsMatrix - See external documentation: wxGraphicsMatrix. DESCRIPTION
See external documentation: wxGraphicsMatrix . This class is derived (and can use functions) from: wxGraphicsObject DATA TYPES
wxGraphicsMatrix() : An object reference, The representation is internal and can be changed without notice. It can't be used for comparsion stored on disc or distributed for use on other nodes. EXPORTS
concat(This::wxGraphicsMatrix(), T::wxGraphicsMatrix()) -> ok See external documentation . get(This::wxGraphicsMatrix()) -> {A::float(), B::float(), C::float(), D::float(), Tx::float(), Ty::float()} See external documentation . getNativeMatrix(This::wxGraphicsMatrix()) -> ok See external documentation . invert(This::wxGraphicsMatrix()) -> ok See external documentation . isEqual(This::wxGraphicsMatrix(), T::wxGraphicsMatrix()) -> bool() See external documentation . isIdentity(This::wxGraphicsMatrix()) -> bool() See external documentation . rotate(This::wxGraphicsMatrix(), Angle::float()) -> ok See external documentation . scale(This::wxGraphicsMatrix(), XScale::float(), YScale::float()) -> ok See external documentation . translate(This::wxGraphicsMatrix(), Dx::float(), Dy::float()) -> ok See external documentation . set(This::wxGraphicsMatrix()) -> ok Equivalent to set(This, []) . set(This::wxGraphicsMatrix(), Options::[Option]) -> ok Types Option = {a, float()} | {b, float()} | {c, float()} | {d, float()} | {tx, float()} | {ty, float()} See external documentation . transformPoint(This::wxGraphicsMatrix()) -> {X::float(), Y::float()} See external documentation . transformDistance(This::wxGraphicsMatrix()) -> {Dx::float(), Dy::float()} See external documentation . AUTHORS
<> wxErlang 0.98.9 wxGraphicsMatrix(3erl)
All times are GMT -4. The time now is 07:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy