Sponsored Content
Full Discussion: Arithmetic In UNIX
Top Forums UNIX for Dummies Questions & Answers Arithmetic In UNIX Post 90551 by qfwfq on Wednesday 23rd of November 2005 04:46:17 PM
Old 11-23-2005
Search for let command. The let command can performs both arithmetic and logic operations.

Code:
# let "A=1*2"
# echo $A
# 2

See : http://www.unix.org.ua/orelly/unix/unixnut/ch04_04.htm

Last edited by qfwfq; 11-23-2005 at 05:52 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

time arithmetic

Can anyone help please. I am writing a kourne shell script and I am unsure how to do the following: I have extracted a time string from a logfile, and I have another time string I want to compare it to to see if it's later than the time I'm comparing with. i.e. expectedSLA="23:00:00", ... (2 Replies)
Discussion started by: csong2
2 Replies

2. UNIX for Dummies Questions & Answers

arithmetic syntax

okay, I'm a complete beginner, and I keep getting stuck on the syntax here. I want to write a script where I read the current time as minutes and seconds, convert the minutes to seconds, and add the two, then redirect the output to a file. the command takes two arguments, which will also be... (1 Reply)
Discussion started by: paprbagprincess
1 Replies

3. Shell Programming and Scripting

arithmetic in ksh

Helloo.. I am trying one very simple thing I could not find anything on google.. I have 2 integer variable..and I need to do division...in ksh where $catch and $num are integer variable.. I tryed with this: printf "%0.2f" $final=$catch/$num but it does not work.. any help is... (12 Replies)
Discussion started by: amon
12 Replies

4. Shell Programming and Scripting

Help with arithmetic operation

I am using egrep to extract numbers from a file and storing them as variables in a script. But I am not able to do any arithmetic operations on the variables using "expr" because it stores them as char and not integers. Here is my code and the error I get. Any help will be appreciated. #!/bin/sh... (3 Replies)
Discussion started by: emjayshaikh
3 Replies

5. Shell Programming and Scripting

arithmetic in tcsh

Yes I know tcsh sucks for scripting and arithmetic but I have to write a script for multiple users and they all use tcsh. I have this variable that I 'set' with but pulling numbers off of stings with set STUFF = `grep string file | awk command` Now I would like to add up the numbers that... (4 Replies)
Discussion started by: gobi
4 Replies

6. UNIX for Dummies Questions & Answers

Arithmetic Operators

Hello, I have a list of 'inputs' and i want to convert those on the second list named 'Desired Outputs', but i don't know how to do it? Inputs Desired Outputs 1 2 94 4 276 8 369 10 464 12 ... (0 Replies)
Discussion started by: filda
0 Replies

7. Shell Programming and Scripting

Arithmetic on timestamps

Hi Friends, please advise on shell script to add two time stamps for example : a=12:32 b=12:00 c=a+b=00:32 please help me to find shell script to add to two time stamps, as i need to convert time from EST to GMT or SST to prepare status of jobs in unix and to specify estimated time to... (3 Replies)
Discussion started by: balireddy_77
3 Replies

8. UNIX for Dummies Questions & Answers

Arithmetic: how to??

Hello all, I'd like to know how to perform arithmetic on multiple files. I have got many tab-delimited files. Each file contains about 2000 rows and 2000 columns. What I want to do is to to sum the values in each row & column in every file. The following explains what I want to do; ... (9 Replies)
Discussion started by: Muhammad Rahiz
9 Replies

9. Shell Programming and Scripting

csh arithmetic ?

Hello, Could someone explain how this one is possible: # @ x = 10 - 11 + 3 # echo $x -4 I know that writing script using csh is bad idea, but I need to write few lines. thanks Vilius (2 Replies)
Discussion started by: vilius
2 Replies

10. Programming

Pointer Arithmetic In C

I have a fundamental question on C pointer arithmetry.. Suppose i have a c string pointer already pointing to a valid location, Can I just do a charptr = charptr +1; to get to the next location, irregardless if my program is 32 or 64 bits? or should i do it this way: charptr =... (1 Reply)
Discussion started by: Leion
1 Replies
EXONERATE(1)						      General Commands Manual						      EXONERATE(1)

NAME
exonerate - suite for investigating DNA and RNA sequence similarities SYNOPSIS
exonerate-client [--help] exonerate-server [--help] fasta2esd [--help] fastaannotatecdna [--help] fastachecksum [--help] fastaclean [--help] fastaclip [--help] fastacomposition [--help] fastadiff [--help] fastaexplode [--help] fastafetch [--help] fastahardmask [--help] fastaindex [--help] fastalength [--help] fastanrdb [--help] fastaoverlap [--help] fastareformat [--help] fastaremove [--help] fastarevcomp [--help] fastasoftmask [--help] fastasort [--help] fastasplit [--help] fastasubseq [--help] fastatranslate [--help] fastavalidcds [--help] DESCRIPTION
These programs are not described by the upstream author, however, some information is available via the --help and -h arguments for all these programs. Whoever is using any of these programs in routine, is requested to provide a seed of a respective man page to the upstream author. OPTIONS
-h, --help Show summary of options. -v, --version Show version of program. SEE ALSO
http://www.ebi.ac.uk/~guy/exonerate/ The author of this package provides a beginner ( http://www.ebi.ac.uk/~guy/exonerate/beginner.html ) and and avanced http://www.ebi.ac.uk/~guy/exonerate/advanced.html ) tutorial on his web pages. AUTHOR
exonerate was written by Guy Slater <guy@ebi.ac.uk>. This manual page was written by Steffen Moeller for the Debian project (but may be used by others). 30 Jun 2007 EXONERATE(1)
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy