Arithmetic Operators


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Arithmetic Operators
# 1  
Old 06-13-2008
Error 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
652 16
744 18
838 20
931 22
1111 26

Example, i know that the first number of the desired outputs will be 2, but from the second input '8' i have to make some arithmetics. I need to make a range between the current number less the before current number from the input list '94-1=93' this value will be divided into 50 '93/50=1.86=2' and for use this result i need to take it without decimals. Then, I'll use the before number from the desired output list which is in this case '2', finally '2+2=4', obtaining the next desired output, repeating this process to complete the desired output list.

Thks for helping me.

Filda
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash -o -v -R operators

I do not know the use of the -o -v -R operators. This is what the info says and I am confused of what optname and varname mean, are they just normal variable? -o optname True if the shell option optname is enabled. See the list of options under the ... (6 Replies)
Discussion started by: kristinu
6 Replies

2. Programming

Combining Operators

Hey everyone, I'm really getting into learning C, but as I look at more advanced example code, I see things like if (!*variable1) blah blah blah... and variable2 ^= *(variable1++); my question is, when you have a combination of two operators, like !*. The ! means 'not' and the *... (2 Replies)
Discussion started by: Lost in Cyberia
2 Replies

3. Shell Programming and Scripting

Miscellaneous operators

Hi everyone, I read some shell script code,then I have some issue. the following code. let "t1 = ((5 + 3, 7 - 1, 15 - 4))" echo "t1 = $t1" t1=11 Here t1 is set to the result of the last operation.why? (3 Replies)
Discussion started by: luoluo
3 Replies

4. Homework & Coursework Questions

Operators

I really don't know the meaning of these operators. Could someone explain the meanings? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

5. Shell Programming and Scripting

Operators

I really don't know the meaning of these operators. Could someone explain the meanings so I can make my test for today? <, <=, ==, !=, >=, >, ||, &&, ! ~ , !~ Thanks! (1 Reply)
Discussion started by: Erjen
1 Replies

6. Shell Programming and Scripting

And and OR Operators with If Statement.

Hi All, I have 2 variables. Result1 and Result2. I want to put a condition that if Both are True then echo "All True" Else Show Error. Right now i am doing this and getting error. if ; then echo "All True" else echo "Failed" fi; Error. line 8: ' Solution: Looking for (2 Replies)
Discussion started by: mkashif
2 Replies

7. Programming

multiplying a number by two without using Arithmetic and Shift operators

Hi All, Is it possible to multiply a number by two without using Arithmetic and Shift operators? _Thanks (5 Replies)
Discussion started by: rvan
5 Replies

8. UNIX for Dummies Questions & Answers

Operators

I am trying to understand Does the following: {tmp+=$10} Mean take $10 and add them all up and call it tmp thanks! (2 Replies)
Discussion started by: llsmr777
2 Replies

9. UNIX for Advanced & Expert Users

If with set operators

Hi guys, I'm trying to run more than one "if" condition at once. What I want is something like if ] or ] or ]; then ... I can't remember the syntax for using this or/and set operators. Can someone please assist/ jog my memory? thanks Khoom (2 Replies)
Discussion started by: Khoomfire
2 Replies

10. UNIX for Advanced & Expert Users

bitwise operators

can anybody write a program to divide a number by another number using bitwise operators (9 Replies)
Discussion started by: areef4u
9 Replies
Login or Register to Ask a Question
XENO-CONFIG(1)							      Xenomai							    XENO-CONFIG(1)

NAME
xeno-config - Display Xenomai libraries configuration SYNOPSIS
xeno-config xeno-config --v | --verbose xeno-config --help xeno-config [--version] [--cc] [--arch] [--prefix] [--xeno-cflags] [--xeno-ldflags] [--posix-cflags] [--posix-ldflags] [--lib*-dir|--library-dir|--libdir|--user-libdir] DESCRIPTION
xeno-config is a script that is used to to display the compiler and linker flags that are required for building applications that use Xeno- mai. Any combination of options can be chosen (except --verbose and --help) to display configuration information, and options can be given in any order. The command output one line for each option, in the same order as the options. When xeno-config --verbose is executed, all configuration information is displayed in a different, more human-readable format. When xeno-config is executed without any options, the output is equivalent to than when executing xeno-config --verbose then xeno-config --help. OPTIONS
--v, --verbose Outputs all configuration information, in a human-readable format. --help Outputs the list of available command-line options. --version Outputs one line with the installed Xenomai version. --cc Outputs one line with the path to the C compiler command that was used to compiled Xenomai. --arch Outputs one line with the architecture to compile to, e.g. i386. May be different from the architecture of the currently running system, if cross-compiling. --prefix Outputs one line with the absolute path to the base Xenomai installation directory. --xeno-cflags Outputs one line with the C compiler command-line options that are necessary to compile applications that use the Xenomai libraries. --xeno-ldflags Outputs one line with the C compiler command-line options that are necessary to link applications against the Xenomai libraries. --posix-cflags Outputs one line with the C compiler command-line options that are necessary to compile applications that use Xenomai's Posix-com- patible layer library. --posix-ldflags Outputs one line with the C compiler command-line options that are necessary to link applications against Xenomai's Posix-compatible layer library. --lib*-dir, --library-dir, --libdir, --user-libdir Outputs one line with the absolute path to Xenomai's libraries. In the --lib*-dir option name, the * is meant as a wildcard: --lib-dir, --libfoo-dir and --libbar-dir are all valid and synonymous options. ENVIRONMENT VARIABLES
DESTDIR If the DESTDIR variable is set, its content is prepended to the Xenomai installed directories and files names output by the --prefix and --library-dir options, and to the Xenomai installation directories in the flags output by the --xeno-cflags, --xeno-ldflags, --posix-cflags, --posix-ldflags options. If DESTDIR was set when compiling and installing Xenomai, e.g. for cross-compilation, DESTDIR must be set to the same value before calling xeno-config, in order to output valid directory and file names. RETURN CODES
0 Successful script execution. 1 The --posix-ldflags option has been given but Posix support is not available in Xenomai; or an invalid argument has been given on the command-line. 2.6.0 2006-03-27 XENO-CONFIG(1)