01-17-2007
Thanks Glenn Arndt & Perderabo!!
Both the solutions are working.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi! Is there is any way to divide the screen when I use UNIX shells (I have RedHat 7.1)? I have to see the command promt and process some data from very long file at the same time (I work with PThreads). Some "pseudo-windows" in text mode, huh? =) Thanks in advance and don't be angry =) (4 Replies)
Discussion started by: ShockTeam
4 Replies
2. Shell Programming and Scripting
I am trying to compare 2 float values using if
the foll code does not work
a=1.4
b=1.6
if test $a -gt $b
then
echo "$a is max"
else
echo "$b is max"
fi
does -gt work for floating point numbers, if not how do go about for my requirement? can i use bc ? pls help
thanks in advance... (2 Replies)
Discussion started by: kavitha
2 Replies
3. Programming
Good morning,
I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>
int main (void)
{
float ceilf(float x);
int dev=3, result=0;
float tmp = 3.444f;
printf("Result: %f\n",ceilf(tmp));
return 0;
} (1 Reply)
Discussion started by: jonas.gabriel
1 Replies
4. Shell Programming and Scripting
Today I spent longer than I'd like to admit figuring out how to write a Bourne shell IF statement that tests a FLOAT value before executing a block of statements. Here's the solution I found, which invokes bc. Hope this will come in handy for someone:
value =
testval =
if
then
body... (5 Replies)
Discussion started by: sjepsen
5 Replies
5. UNIX for Advanced & Expert Users
Hi Guys,
here is a part of my source code. This part is reponsible to get the minimun of a few values:
..........
MAX=0.00
for a in `cat $OFILE`
do
if
then
... (2 Replies)
Discussion started by: Paat
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I am new to unix and I am trying hard to get this requirement, but no luck.
I am trying to compare two cloumns in two files and if it matches, the last column in file1 must be divided by file2 and the output must be written in a new file. To elaborate the 2nd column in file1 (EUR) must be... (6 Replies)
Discussion started by: smadderla
6 Replies
7. Shell Programming and Scripting
Hi,
I do have a very simple task to divide 2 variables and display the result.
I CANNOT use bc
when i try
var1=2
var2=4
var3=$(($var1 / $var2))
echo $var3
the output is always 0
What can I change to get a dotted decimal result such as 0.5 ?
Thanks! (5 Replies)
Discussion started by: svetoslav_sj
5 Replies
8. Programming
Hi,
I have small problem to print float value in the fallowing code
float Cx, W,f=250000, Cr=92.00,pi=3.14;
W=2*pi*f;
Cx = 1/W.Cr; //Cx value will be come around like 7.07E-9.
printf("capacitance value: %.10f",Cx);
I am trying to print Cx value using above code but it was not... (3 Replies)
Discussion started by: veerubiji
3 Replies
9. Shell Programming and Scripting
Does anyone know how to include as a script maybe an "echo" warning that explains that if a user uses the second number "zero" when dividing, that the result will BE "zero."
I need, example: 5/0 (second number) = 0, in script form.
current script:
echo "Enter a number"
read num1
echo... (4 Replies)
Discussion started by: jefferj54
4 Replies
10. Shell Programming and Scripting
Hello everyone, I have a dataset that looks like:
1 2
3 4
5 6
I was wondering if was possible to divide values within rows:
1/2
3/4
5/6
I don't think using awk -F"\t" '{ print $1/$2 }' would work here, or would it?
Thanks in advance! (2 Replies)
Discussion started by: Rabu
2 Replies
PNG(5) File Formats Manual PNG(5)
NAME
png - Portable Network Graphics (PNG) format
DESCRIPTION
PNG (Portable Network Graphics) is an extensible file format for the lossless, portable, well-compressed storage of raster images. PNG pro-
vides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are
supported, plus an optional alpha channel. Sample depths range from 1 to 16 bits.
PNG is designed to work well in online viewing applications, such as the World Wide Web, so it is fully streamable with a progressive dis-
play option. PNG is robust, providing both full file integrity checking and fast, simple detection of common transmission errors. Also, PNG
can store gamma and chromaticity data for improved color matching on heterogeneous platforms.
SEE ALSO
libpng(3),zlib(3),deflate(5),andzlib(5)
PNG specification (second edition), November 2003:
<http://www.w3.org/TR/2003/REC-PNG-20031110/ PNG 1.2 specification, July 1999:
http://www.libpng.org/pub/png
PNG 1.0 specification, October 1996:
RFC 2083
ftp://ds.internic.net/rfc/rfc2083.txt
or (as a W3C Recommendation) at
http://www.w3.org/TR/REC-png.html
AUTHORS
This man page: Glenn Randers-Pehrson
Portable Network Graphics (PNG) Specification (Second Edition) Information technology - Computer graphics and image processing - Portable
Network Graphics (PNG): Functional specification. ISO/IEC 15948:2003 (E) (November 10, 2003): David Duce and others.
Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999): Glenn Randers-Pehrson and others (png-list).
Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996): Thomas Boutell and others (png-list).
COPYRIGHT NOTICE
This man page is Copyright (c) 1998-2006 Glenn Randers-Pehrson. See png.h for conditions of use and distribution.
The PNG Specification (Second Edition) is Copyright (c) 2003 W3C. (MIT, ERCIM, Keio), All Rights Reserved.
The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson. See the specification for conditions of use and distribution.
The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of Technology. See the specification for conditions of use and
distribution.
June 26, 2010 PNG(5)