Sponsored Content
Homework and Emergencies Homework & Coursework Questions Unix/Linux Math Decimal to Whole Number Format? Post 302549727 by yazu on Tuesday 23rd of August 2011 10:47:34 PM
Old 08-23-2011
Please (in order easy to copy and try your script):
1. Use code tags for code.
2. Remove line numbers.

And what is wrong with just changing 0.03 to 3 and 0.06 to 6?
---
Ok, a silly question.

Last edited by yazu; 08-24-2011 at 12:21 AM.. Reason: silly question
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Number format conversion in UNIX

Hi All, I want to convert Scientific number format into normal number format using unix script or using any command of unix. e.g 1.55397e+09 into 1553970000 Thanks in advance Kamal (1 Reply)
Discussion started by: kamal_418
1 Replies

2. Shell Programming and Scripting

format decimal in ksh

hi all, in ksh, how do i format a decimal number (e.g 3381.19) to integer (e.g 3381). This number is average time response for server in millisec and i wanted to display it in a more readable format i.e in seconds without any decimals. thanks in advance. (2 Replies)
Discussion started by: cesarNZ
2 Replies

3. Shell Programming and Scripting

Decimal format

Hello Friends, I have a file with below format... 1234,Hary,102.55 4567,Maria,250.40 78942,suzan,261.60 48965,Harun,179.32 And I want to check the last column. If the decimal value of the last column is below 50, I need that column else ignore that column. Can anyone help me out? (3 Replies)
Discussion started by: mziaullah
3 Replies

4. Shell Programming and Scripting

IP address to decimal format conversion

I have a file which consist of some class 4 IP address as 172.16.112.50 172.16.112.50 172.16.112.50 172.16.112.100 192.168.1.30 172.16.112.100 172.16.112.50 172.16.112.50 172.16.112.50 i want to store them in pure decimal notations instead of the given dotted decimal formats e.g.... (2 Replies)
Discussion started by: vaibhavkorde
2 Replies

5. Shell Programming and Scripting

number of digits after decimal

Hi All, I have a file of decimal numbers, cat file1.txt 1.1382666907 1.2603107334 1.6118799297 24.4995857056 494.7632588468 560.7633734425 ..... I want to see the output as only 7 digits after decimal (5 Replies)
Discussion started by: senayasma
5 Replies

6. Shell Programming and Scripting

Awk - Summation in Proper decimal Format

Hi I am executing below command to do summation on 46th coloumn. cat File1| awk -F"|" '{p += $46} END { printf"Column Name | SUM | " p}' I am getting output as Column Name | SUM | 1.01139e+10 Here I want output in Proper decimal format. Can someone tell me what change is required for same? (1 Reply)
Discussion started by: sanranad
1 Replies

7. Shell Programming and Scripting

Sort Decimal number in UNIX

Hello Everyone, In one of my script, I would like to sort the decimal numbers. For e.g. If I have numbers like 1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.10 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 I would like to sort them 1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.2 7.3 7.4... (3 Replies)
Discussion started by: sachinrastogi
3 Replies

8. UNIX for Dummies Questions & Answers

Linux Math Help

I am struggling with scripting this challenge a friend and I have. You have file1 and its contents is a single number you have file 2 and its contents are a different number you want to add file1 to file2 and have the output be put into file3 (3 Replies)
Discussion started by: minkyboodle
3 Replies

9. UNIX for Dummies Questions & Answers

How to control the decimal points for p-values in scientific format?

Dear all, I have a txt file with only one column which contains p values. My data looks like this: 5.04726976606584e-190 2.94065711152402e-189 2.94065711152402e-189 9.19932135717279e-176 1.09472516659859e-170 1.24974648916809e-170 0.1223974648916 0.9874974648916 ... what I want... (2 Replies)
Discussion started by: forevertl
2 Replies
NNTIDY(1)						      General Commands Manual							 NNTIDY(1)

NAME
nntidy - tidy your personal .newsrc file SYNOPSIS
nntidy [ -aciNQrsuv ] [ group ]... DESCRIPTION
nntidy will clean out non-existing groups, adjust obviously wrong article numbers, and remove badly formed lines from your .newsrc file. It may optionally remove ignored groups, unsubscribed groups, and groups which are not part of your presentation sequence or the groups specified on the command line. You should run nntidy if your rc file has been corrupted for some reason. OPTIONS
-a Equivalent to -cisu. -c Remove unrecognized lines. This will also remove the `options' line used by some older news readers, such as readnews(1) -i Remove entries for groups which are ignored in the database, e.g. entries marked with `X' in the GROUPS file. -r Remove entries for unsubscribed groups. -s Remove entries which are not included in the group presentation sequence defined in the init file. If one or more groups are speci- fied on the command line, entries not matched by these groups (and their subgroups etc) will be removed. Notice that depending on how you construct the presentation sequence, this may cause unsubscribed groups to be removed from .newsrc, but this will not normally happen. -u Truncate entries for unsubscribed groups, by removing the article numbers and leaving only the news group name and the `!' mark. -v Verbose operation. Reports each change made to the .newsrc file. -N No update mode. The requested operations are performed, but the result is not written back to disk. This can be used with the -v option to see whether tidying is required. -Q Quiet operation. The version information is not printed. FILES
~/.newsrc The record of read articles ~/.newsrc.tidy The original rc file before tidy SEE ALSO
nn(1), nncheck(1), nngoback(1), nngrab(1), nngrep(1), nnpost(1) nnadmin(1M), nnusage(1M), nnmaster(8) AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark E-mail: storm@texas.dk 4th Berkeley Distribution Release 6.6 NNTIDY(1)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy