Sponsored Content
Top Forums Shell Programming and Scripting Remainder of x/y in shell script Post 302114725 by anbu23 on Wednesday 18th of April 2007 07:55:17 AM
Old 04-18-2007
Code:
expr 10 % 3

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

2. Homework & Coursework Questions

HELP! If statement with remainder testing

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: accept the selling price (range 5¢ to $1.05) as a command line argument (cents only); reject prices out of... (3 Replies)
Discussion started by: danieldcc
3 Replies

3. Shell Programming and Scripting

Correct shell script to Call One shell script from another shell script

Hi All, I have new for shell scripting. Problem : I have one scrip at serv1 and path of server is /apps/dev/provimage/scripts and script name:extract_ancillary.bat. I need to call this script at server2(my working server) and execute at server2 . Please let me know how to build the... (5 Replies)
Discussion started by: Vineeta Nigam
5 Replies

4. Shell Programming and Scripting

Use sed to delete remainder of line after pattern

Greetings, I need some assistance here as I cannot get a sed line to work properly for me. I have the following list: Camp.S01E04.720p.HDTV.X264-DIMENSION Royal.Pains.S05E07.720p.HDTV.x264-IMMERSE Whose.Line.is.it.Anyway.US.S09E05.720p.HDTV.x264-BAJSKORV What I would like to accomplish is to... (3 Replies)
Discussion started by: choard
3 Replies

5. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

6. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

7. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

8. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

9. UNIX for Beginners Questions & Answers

Bash script to get total size off of remainder calculated

I am working on a script to get the final total size and so far have the following and wondering if this can be improved. # Compare the desired size of each lvm to the standard size. If it is desired is larger than calculate the difference and keep that value as the amount to add to that LVM. ... (5 Replies)
Discussion started by: user3528
5 Replies

10. UNIX for Beginners Questions & Answers

Shell script newbie- how to generate service log from shell script

Hi, I am totally a newbie to any programming languages and I just started an entry level job in an IT company. One of my recent tasks is to create a script that is able to show the log file of linux service (i.e. ntpd service) lets say, if I run my script ./test.sh, the output should be... (3 Replies)
Discussion started by: xiaogeji
3 Replies
fmod(3) 						     Library Functions Manual							   fmod(3)

NAME
fmod, drem, remainder - Compute the floating-point remainder LIBRARY
Math Library (libm.a) SYNOPSIS
#include <math.h> double fmod (double x, double y); float fmodf (float x, float y); long double fmodl (long double x, long double y); double drem (double x, double y); float dremf (float x, float y); long double dreml (long double x, long double y); double remainder (double x, double y); float remainderf (float x, float y); long double remainderl (long double x, long double y); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: fmod(): XPG4 remainder(): XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The fmod(), fmodf(), and fmodl() functions return the remainder r = x - n*y, where n = trunc(x/y). The result has the same sign as x and magnitude less than the magnitude of y. The remainder is computed exactly and |r| is less than |y|. The drem(), dremf(), dreml(), remainder(), remainderf(), and remainderl() functions return the remainder r = x - n*y, where n = rint(x/y). Additionally, if |n - x/y|=1/2, then n is even. The remainder is computed exactly and |r| is less than or equal to |y|/2. The drem() and remainder() functions are aliases of each other. The dremf(), and remainderf() functions are aliases of each other. The dreml() and remainderl() functions are aliases of each other. The following table describes function behavior in response to exceptional arguments: --------------------------------------------------------------------------- Function Exceptional Argument Routine Behavior --------------------------------------------------------------------------- fmod(), fmodf(), fmodl() x = infinity Invalid argument fmod(), fmodf(), fmodl() y = 0 Invalid argument drem(), dremf(), dreml() x = infinity Invalid argument drem(), dremf(), dreml() y = 0 Invalid argument remainder() x = infinity Invalid argument remainderf() x = infinity Invalid argument remainderl() x = infinity Invalid argument remainder() y = 0 Invalid argument remainderf() y = 0 Invalid argument remainderl() y = 0 Invalid argument --------------------------------------------------------------------------- delim off fmod(3)
All times are GMT -4. The time now is 08:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy