11-01-2011
i want only number values,not character...
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
In a unix shell script,i want to round a variabele to a nearest number
Ex: set count=104.4
How can i round that to 105.?
Thanks,
Sateesh (2 Replies)
Discussion started by: kotasateesh
2 Replies
2. Shell Programming and Scripting
Is there an easy way to round a number up in Korn shell?
ie. 10.4 --> 11
Thanks. (6 Replies)
Discussion started by: here2learn
6 Replies
3. Shell Programming and Scripting
In a shell script - How do I round a decimal number (contained in a variable) to the nearest whole number? (2 Replies)
Discussion started by: achieve
2 Replies
4. Shell Programming and Scripting
Hi ....
Iam having the file ....in which 3rd column is numerical having 8 decimal part... i want that to cut to 2 decimal part ...
Source File :
E100|0|19940.10104030|0|1ABC
E103|1|19942.10195849|3|0ABC
E100|0|19943.10284858|0|1ABC
I want to be ......
Reulst:
... (4 Replies)
Discussion started by: satyam_sat
4 Replies
5. Shell Programming and Scripting
Hi, I have a problem. Basically I dont know how to use awk. I have a script (below) which works fine.
What I want to do is somehow "pipe" in the input say 4.5 and have it give the anwer, I dont want ot have to type it in, since it will be running in a script.
Any ideas how to do this????
... (1 Reply)
Discussion started by: AnnaLynn
1 Replies
6. Shell Programming and Scripting
my $number = 12.345673412 I need 3 digits after decimal or after dot(.)
i mean , i need only 12.345
I used int(), ceil(), floor() but it gives me only 12
I need it. (10 Replies)
Discussion started by: pritish.sas
10 Replies
7. Shell Programming and Scripting
Hi All,
I would like to do the following in the shell script
561.76 to 562
I tried using this echo 'scale=0; 749 * 75 /100 ' | bc
but just returned only 561
Please help me . I appreciate your help
Thanks
rajeevm (13 Replies)
Discussion started by: rajeevm
13 Replies
8. Shell Programming and Scripting
Please help me in rounding up value upto 2 decimal palces using sed command
#!/usr/bin/bash
a=15.42
b=13.33
c=`echo $a*$b |bc -l`
echo $c
above code is is giving output "205.5486" but i want the output as "205.55"
Thank you... (15 Replies)
Discussion started by: ranabhavish
15 Replies
9. Shell Programming and Scripting
Hi Guys,
i am having a csv file where i need to round off numerical column to 2 decimal precision in specific columns. i need to ignore the first two line i.e the header columns and manipulate rest of the lines of the csv file. My columns are specific i.e i need to round off only 2nd,4th and... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
LEARN ABOUT ULTRIX
isalnum
ctype(3) Library Functions Manual ctype(3)
Name
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii - character classification
macros
Syntax
#include <ctype.h>
int isalpha (c)
int c;
Description
These macros classify character-coded integer values according to the rules of the coded character set (codeset) identified by the last
successful call to category All macros return non-zero for true and zero for false.
If category has not been called successfully, or if character classification information is not available for a supported language, then
characters are classified according to the rules of the ASCII 7-bit coded character set, returning 0 for values above octal 0177.
The macro provides a result for all integer values. The rest provide a result for EOF and values in the character range of the codeset
identified by the last successful call to category
c is a letter
c is an uppercase letter
c is a lowercase letter
c is a digit
c is a hexadecimal digit, by default [0-9], [A-F], or [a-f]
c is an alphanumeric character
c is a space, tab, carriage return, new line, or form feed
c is a punctuation character (neither control, alphanumeric, nor space)
c is a printing character, by default code 040(8) (space) through 0176 (tilde)
c is a printing character, like except false for space
c is a delete character(0177) or ordinary control character (less than 040) except for space characters
c is an ASCII character, code less than 0200
International Environment
LC_CTYPE If this environment variable is set and valid, uses the international language database named in the definition to determine
character classification rules.
LANG If this environment variable is set and valid, uses the international language database named in the definition to determine
the character classification rules. If is defined, that definition supercedes the definition of
See Also
conv(3), setlocale(3), stdio(3s), environ(5int), ascii(7)
Guide to Developing International Software
ctype(3)