Sponsored Content
Full Discussion: Printf statement
Top Forums Shell Programming and Scripting Printf statement Post 302501044 by jim mcnamara on Wednesday 2nd of March 2011 10:18:00 AM
Old 03-02-2011
$4 is not numeric, or is null
 

10 More Discussions You Might Find Interesting

1. Programming

printf

What is the output of the following program considering an x86 based parameter passing sequence where stack grows towards lower memory addresses and that arguments are evaluated from right to left: int i=10; int f1() { static int i = 15; printf("f1:%d ", i); return i--; } main() {... (2 Replies)
Discussion started by: arunviswanath
2 Replies

2. Shell Programming and Scripting

printf

How to print output in following format? A..................ok AA................ok AAA..............ok AAAAAA........ok "ok" one under one (4 Replies)
Discussion started by: mirusnet
4 Replies

3. Shell Programming and Scripting

If statement - How to write a null statement

In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands. How do I write the "do nothing" statement in the following example? Example: if (( "$x"="1" && "$y"="a" && "$z"="happy" )) then do nothing else command command fi... (3 Replies)
Discussion started by: april
3 Replies

4. Shell Programming and Scripting

How is use sselect statement o/p in insert statement.

Hi All, I am using Unix ksh script. I need to insert values to a table using the o/p from a slelect statement. Can anybody Help! My script looks like tihs. ---`sqlplus -s username/password@SID << EOF set heading off set feedback off set pages 0 insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies

5. UNIX for Dummies Questions & Answers

Need help with printf

Hi, I have just completed my first script (:D) and now i just need to format it with printf. This is what I have: #!/bin/ksh TOTB=0 TOTF=0 TOTI=0 HOST=`hostname` echo " FSYSTEM BLKS FREE INUSE MOUNTEDON" df -m | grep -v ":"|grep -v Free|grep -v "/proc"| while read FSYSTEM... (2 Replies)
Discussion started by: compan023
2 Replies

6. UNIX for Dummies Questions & Answers

printf function

#include<stdio.h> int counter; int fibonacci(int n) { counter += 1; if ( n <= 2 ) return 1; else return fibonacci(n-1) + fibonacci(n-2); } int main(void) { int i; int sum ; for( i = 1 ; i<= 10; i++) { counter = 0; sum... (1 Reply)
Discussion started by: vincent__tse
1 Replies

7. Shell Programming and Scripting

creating printf statement using user arguments

I am writing a script in bash and want to perform the operation I check number of arguments and make a print statement with the passes arguments If I pass 3 arguments I will do printf "$frmt" "$1" "$2" "$3"If I have 4 arguments I do printf "$frmt" "$1" "$2" "$3" "$4"etc (4 Replies)
Discussion started by: kristinu
4 Replies

8. Shell Programming and Scripting

How to add printf statement in awk command?

hi all i need to add the prinf statement in awk command for the converted comma separated output.... below is my code : Code Credits :RudiC awk -F, 'NF==2 {next} {ITM=$1 AMT=$2+0 CNT=$3+0 TOTA+=$2 ... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

9. Shell Programming and Scripting

Printf statement for currency conversion

hi all, I had my script as a=qw b=rter c=fdfd curency=1000 printf"${curency} $a $b $c" > filename can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Discussion started by: hemanthsaikumar
14 Replies

10. Shell Programming and Scripting

Convert Update statement into Insert statement in UNIX using awk, sed....

Hi folks, I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex. I have a bunch of update statements with all columns in a file which I need to convert into insert statements. UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
fmax(3M)						  Mathematical Library Functions						  fmax(3M)

NAME
fmax, fmaxf, fmaxl - determine maximum numeric value of two floating-point numbers SYNOPSIS
c99 [ flag... ] file... -lm [ library... ] #include <math.h> double fmax(double x, double y); float fmaxf(float x, float y); long double fmaxl(long double x, long double y); DESCRIPTION
These functions determine the maximum numeric value of their arguments. NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, these functions choose the numeric value. RETURN VALUES
Upon successful completion, these functions return the maximum numeric value of their arguments. If just one argument is a NaN, the other argument is returned. If x and y are NaN, a NaN is returned. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
fdim(3M), fmin(3M), math.h(3HEAD), attributes(5), standards(5) SunOS 5.11 12 Jul 2006 fmax(3M)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy