07-26-2006
10 More Discussions You Might Find Interesting
1. 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
2. UNIX for Dummies Questions & Answers
I'm trying to have a loop print out statistics every X number of seconds. How can I add a specific number of seconds to a time variable and make a comparison? Thanks ahead of time.
For example:
startTime = `date +%H%M%S`
currentTime = $startTime
executeTime = startTime + X # X is equal... (5 Replies)
Discussion started by: Nysif Steve
5 Replies
3. Shell Programming and Scripting
hi all,
was wondering if there is another way to do calculations in ksh scripts other than using bc ?? i am using a script to calculate average response time and my script errors out after running for a bit.
e.g code i am using :
averageTime=$(print "$totalTime / $numberOfEntries" |... (2 Replies)
Discussion started by: cesarNZ
2 Replies
4. UNIX for Dummies Questions & Answers
I need to be able to use the current date and calculate 7 days ago to be stored in another variable to be passed to a file in my Unix shell script. I need the date in the following format:
date '+%m/%d/%Y'
or
05/16/2006
How do I calculate date minus 7 days or 1 week ago? (8 Replies)
Discussion started by: mitschcg
8 Replies
5. Shell Programming and Scripting
HI
i have following problem,
i need to use split command to split files each should be cca 700 lines but i dont know how to inplement it in the scripts becasuse each time the origin file will be various size ,
any body got any idea
cheers (2 Replies)
Discussion started by: kvok
2 Replies
6. UNIX for Dummies Questions & Answers
Dear All,
I have a long list like this:
337
375
364
389
443
578
1001
20100
.
.
.
.
etc
I would like to substract each value from the first entry which in this case is 337 and report it in a separate column. So the expected output looks like
337 0 (10 Replies)
Discussion started by: pawannoel
10 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have to turn:
Apple Inc.:325,64:329,57
into
Apple Inc.:325,64:329,57:3,93
3,93=329,57-325,64.
My code:
cat beurs.txt | sed 's/\(*\):\(*\),*\(*\):\(*\),\(*\)/\4\.\5-\2\.\3/' beurs.txt | bc| tr '.' ',' | sed 's/^-*,/0,/' > winstmarges.txt; paste -d: beurs.txt winstmarges.txt; rm... (5 Replies)
Discussion started by: ikke008
5 Replies
8. Shell Programming and Scripting
grep Quality abc.txt | awk -F"=" '{print $2}'
o/p is given as
70/70
49/70
I want in the below format (percentage format)
100%
70%
help me!!!!:confused::confused::confused:
---------- Post updated at 09:59 AM ---------- Previous update was at 09:57 AM ----------
Cell 01 -... (3 Replies)
Discussion started by: nikhil jain
3 Replies
9. Shell Programming and Scripting
Attached are the is original output (zipped file) and a custom file using the awk code below in which the average reads per bait are calculated (average.txt)
awk '{if(len==0){last=$4;total=$6;len=1;getline}if($4!=last){printf("%s\t%f\n", last,... (7 Replies)
Discussion started by: cmccabe
7 Replies
10. UNIX for Beginners Questions & Answers
Hello. I'm writing an awk script that looks at a .csv file and calculates the weighted grade for each student based on the scores and categories in the file. I am able to get the script to run the only issue however is that the same score for each student is the same. I'm self-teaching myself the... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT DEBIAN
httppower
httppower(8) powerman httppower(8)
NAME
httppower - communicate with HTTP based power distribution units
SYNOPSIS
httppower [--url URL]
DESCRIPTION
httppower is a helper program for powerman which enables it to communicate with HTTP based power distribution units. It is run interac-
tively by the powerman daemon.
OPTIONS
-u, --url URL
Set the base URL.
INTERACTIVE COMMANDS
The following commands are accepted at the httppower> prompt:
auth user:pass
Authenticate to the base URL with specified user and password, using ``basic'' HTTP authentication which sends the user and password
over the network in plain text.
seturl URL
Set the base URL. Overrides the command line option.
get [URL-suffix]
Send an HTTP GET to the base URL with the optional URL-suffix appended.
post [URL-suffix] key=val[&key=val]...
Send an HTTP POST to the base URL with the optional URL-suffix appended, and key-value pairs as argument.
FILES
/usr/sbin/httppower
/etc/powerman/powerman.conf
ORIGIN
PowerMan was originally developed by Andrew Uselton on LLNL's Linux clusters. This software is open source and distributed under the terms
of the GNU GPL.
SEE ALSO
powerman(1), powermand(8), httppower(8), plmpower(8), vpcd(8), powerman.conf(5), powerman.dev(5), powerman-devices(7).
http://sourceforge.net/projects/powerman
powerman-2.3.5 2009-02-09 httppower(8)