Sponsored Content
Full Discussion: divide issue
Top Forums UNIX for Dummies Questions & Answers divide issue Post 302166847 by kotasateesh on Wednesday 13th of February 2008 01:29:38 AM
Old 02-13-2008
divide issue

Hi,
I have a issue dividing 2 values in UNIX

a=15
b=100
c = a / b ==> and it is returning 0 instead of 0.15 into variable C.

How can i resolve this issue ? please help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script needs to divide by 2

i need to divide this count by 2, what variable can i use in my script? 26 hcscprod_cpus_totals /2 = 13 13 hcncprod_cpus_totals /2= 6.5 541 ktazp_cpus_totals /2= 270.5 346 ktazd_cpus_totals /2=173 110 ktazi_cpus_totals /2=55 10 ktazq_cpus_totals /2=5 (2 Replies)
Discussion started by: wereyou
2 Replies

2. Shell Programming and Scripting

divide with awk

Dear, i want to devide the first 4 values from a raw over the next 4 values like the following: $1+$2+$3+$4 / $5+$6+$7+$8 using AWK ....can someone help me? Sanks (1 Reply)
Discussion started by: tontal
1 Replies

3. Shell Programming and Scripting

divide a string into variables

i have /tmp/dev/string1/testfile.txt i need only testfile.txt How can get that..can anyone helpme out Thanx (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

4. Shell Programming and Scripting

How to divide results into several pages?

Hi All, I am wondering if anyone can help me with this. I have a long list of results and I want to divide them into several pages. Any ideas of how to do this? I'm using perl languange. eg: Output file consist of 400 data then would like to divide it into 50 data per pages. any help on... (2 Replies)
Discussion started by: kate katherine
2 Replies

5. Shell Programming and Scripting

Divide numbers into intervals

divide input values into specified number (-100 or -200) according to the key (a1 or a2 ....) For ex: if we give -100 in the command line it would create 100 number intervals (1-100, 100-200, 200-300) untill it covers the value 300 in a1. Note: It should work the same even with huge numbers... (3 Replies)
Discussion started by: ruby_sgp
3 Replies

6. Shell Programming and Scripting

Divide variable

Hi All, here D Prints the bytes value .plz help to convert the variable D value to MB in new variable $E D=`more $C |awk '{print $6;}'` Thanks in Advance.:) (3 Replies)
Discussion started by: netdbaind
3 Replies

7. Shell Programming and Scripting

Divide two variable

F= `expr $E/$S` output test5.sh: line 45: 1296863.27001857757568359375/21997: No such file or directory can any one help me ,i just want to divide the $E/$S and Print o/p in F. (3 Replies)
Discussion started by: netdbaind
3 Replies

8. Shell Programming and Scripting

Divide by zero script

Hi, I've been working on a few scripts and have been getting great info. How, would I include in the below script, how I would let a user know that if they divide a SECOND number by zero, that they would get a divide by zero error? What's the easiest way of working this? Cordially, joe. ... (1 Reply)
Discussion started by: jefferj54
1 Replies

9. UNIX for Dummies Questions & Answers

To divide file

We have large log files, and we need to extract last four hours lines only, Please let us know the command. Thanks, Saurau. (1 Reply)
Discussion started by: saurau
1 Replies

10. Shell Programming and Scripting

Divide the numbers in file

Dear ALL, I have sample file : tx_bytes: 2422, tx_packets: 13, uptime: 16119, tx_bytes: 2342, tx_packets: 14, uptime: 11009, tx_bytes: 252, tx_packets: 12, uptime: 3113, my formula : minutes=$(( uptime/60%60 )) hours=$(( uptime/60/60%24 )) (3 Replies)
Discussion started by: gnulyn
3 Replies
Net::GitHub::V3(3pm)					User Contributed Perl Documentation				      Net::GitHub::V3(3pm)

NAME
Net::GitHub::V3 - Github API v3 SYNOPSIS
Prefer: use Net::GitHub; my $gh = Net::GitHub->new( version => 3, login => 'fayland', pass => 'mypass', # or # access_token => $oauth_token ); Or: use Net::GitHub::V3; my $gh = Net::GitHub::V3->new( login => 'fayland', pass => 'mypass', # or # access_token => $oauth_token ); DESCRIPTION
<http://develop.github.com/> ATTRIBUTES Authentication There are two ways to authenticate through GitHub API v3: login/pass my $gh = Net::GitHub::V3->new( login => $ENV{GITHUB_USER}, pass => $ENV{GITHUB_PASS} ); access_token my $gh = Net::GitHub->new( access_token => $ENV{GITHUB_ACCESS_TOKEN} ); raw_response my $gh = Net::GitHub->new( # login/pass or access_token raw_response => 1 ); return raw HTTP::Response object raw_string my $gh = Net::GitHub->new( # login/pass or access_token raw_string => 1 ); return HTTP::Response response content as string api_throttle my $gh = Net::GitHub->new( # login/pass or access_token api_throttle => 0 ); To disable call rate limiting (e.g. if your account is whitelisted), set api_throttle to 0. RaiseError By default, error responses are propagated to the user as they are received from the API. By switching RaiseError on you can make the be turned into exceptions instead, so that you don't have to check for error response after every call. next_url, last_url, prev_url, first_url Any methods which return multiple results may be paginated. After performing a query you should check to see if there are more results. These attributes will be reset for each query. The predicates to check these attributes are "has_next_page", "has_last_page", "has_prev_page" and "has_first_page". See Github's documentation: <http://developer.github.com/v3/#pagination> The "per_page" parameter mentioned in their docs is NOT supported by this module. my @issues = $gh->issue->repos_issues; while ($gh->issue->has_next_page) { push @issues, $gh->issue->query($gh->issue->next_url); ## OR ## push @issues, $gh->issue->next_page); } METHODS query($method, $url, $data) my $data = $gh->query('/user'); $gh->query('PATCH', '/user', $data); $gh->query('DELETE', '/user/emails', [ 'myemail@somewhere.com' ]); query API directly next_page When the results have been paginated, "next_page" is sugar for the common case of iterating through all the pages in order. It simply calls "query" with the "next_url". set_default_user_repo $gh->set_default_user_repo('fayland', 'perl-net-github'); # take effects for all $gh-> $gh->repos->set_default_user_repo('fayland', 'perl-net-github'); # take effects on $gh->repos To ease the keyboard, we provided two ways to call any method which starts with :user/:repo 1. SET user/repos before call methods below $gh->set_default_user_repo('fayland', 'perl-net-github'); my @contributors = $gh->repos->contributors; 2. If it is just for once, we can pass :user, :repo before any arguments my @contributors = $repos->contributors($user, $repo); MODULES user my $user = $gh->user->show('nothingmuch'); $gh->user->update( bio => 'Just Another Perl Programmer' ); Net::GitHub::V3::Users repos my @repos = $gh->repos->list; my $rp = $gh->repos->create( { "name" => "Hello-World", "description" => "This is your first repo", "homepage" => "https://github.com" } ); Net::GitHub::V3::Repos issue my @issues = $gh->issue->issues(); my $issue = $gh->issue->issue($issue_id); Net::GitHub::V3::Issues pull_request my @pulls = $gh->pull_request->pulls(); Net::GitHub::V3::PullRequests org my @orgs = $gh->org->orgs; Net::GitHub::V3::Orgs git_data Net::GitHub::V3::GitData gist Net::GitHub::V3::Gists oauth Net::GitHub::V3::OAuth event Net::GitHub::V3::Events SEE ALSO
Any::Moose, Pithub AUTHOR &; COPYRIGHT & LICENSE Refer Net::GitHub perl v5.14.2 2012-05-03 Net::GitHub::V3(3pm)
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy