10 More Discussions You Might Find Interesting
1. OS X (Apple)
Hi guys...
I am working on limited basic set of maths routines for ksh93 that can be sourced as . ./ksh_math.sh and I am gobsmacked by its capabilities.
Although some big guns may already know this, I didn't, and ksh93 is easily able to do floating point numbers to floating point powers and... (16 Replies)
Discussion started by: wisecracker
16 Replies
2. Shell Programming and Scripting
Hi,
I've this following text file
FileVersion = 1.03
Filetype = meteo_on_curvilinear_grid
TIME = 0 hours since 2016-10-03 12:00:00 +00:00
-6.855 -6.828 -6.801 -6.774 -6.747 -6.719 -6.691 -6.663 -6.634 -6.606 -6.577 -6.548 -6.519 -6.489
TIME = 0 hours since... (2 Replies)
Discussion started by: xisan
2 Replies
3. Shell Programming and Scripting
Hi,
I wish to compare the CPU LOAD 1 min with 5mins and 15mins.
If 1 min's CPU LOAd spike 3% compare to 5 mins or 15 mins CPU Load, it is warning.
If 1 min's CPU LOAd spike 5% compare to 5 mins or 15 mins CPU Load, it is critical.
However I received following code error, I google it and... (10 Replies)
Discussion started by: alvintiow
10 Replies
4. Shell Programming and Scripting
is it not possible to simply di aritmetic without using bc or awk
i have tried folllowing operatrions but they support only integer types plz suggest me code for floating using values stored in the variables.the ans i get is integer and if i input floating values i get error numeric constant... (6 Replies)
Discussion started by: sumit the cool
6 Replies
5. Shell Programming and Scripting
I have output like following in a file
usmtnz-dinfsi19
72
71
38
1199
1199
0.8
19:23:58
usmtnz-dinfsi19
72
71
38
1199
1199
0.8
19:24:04 (9 Replies)
Discussion started by: fugitive
9 Replies
6. UNIX for Dummies Questions & Answers
Here's a program and its pretty simple .It requires file handling and some calculations but on running it I am not getting the required result.It seems that the code outside the file read's outer while loop is not executing e.g the print statement is not being printed.Plz Help!
#include<stdio.h>... (1 Reply)
Discussion started by: headrush
1 Replies
7. Programming
Hi,
see the simple code below
double i;
i=8080.9940;
printf(" val :%.30f\n",i);
output i m getting is
val :8080.993999999999700000000000000
when i m expecting
val :8080.9940
what happens?how can i avoid it?
thanks... (2 Replies)
Discussion started by: Hara
2 Replies
8. UNIX for Dummies Questions & Answers
Hi, All,
I have a file, its content is as follows:
100 150
120 135
140 170
I want to insert a column, its content is determined by the difference between the two values in the same line, if the difference is less than 20, the new value is 1, otherwise is 0.
after the operation, the... (1 Reply)
Discussion started by: Jenny.palmy
1 Replies
9. Shell Programming and Scripting
I am using egrep to extract numbers from a file and storing them as variables in a script. But I am not able to do any arithmetic operations on the variables using "expr" because it stores them as char and not integers. Here is my code and the error I get. Any help will be appreciated.
#!/bin/sh... (3 Replies)
Discussion started by: emjayshaikh
3 Replies
10. Shell Programming and Scripting
I have no idea why I can't get this to work, if anybody can help i would appreciate it.
#!/bin/bash
x=`cat counter.txt | wc -l`
y= '$x / 7'
printf "%d People have visited this page" $y
:confused: (2 Replies)
Discussion started by: paladyn_2002
2 Replies