Sponsored Content
Top Forums Shell Programming and Scripting Bash script - cygwin (powershell?) pull from GitHub API Parse JSON Post 302914715 by Scrutinizer on Wednesday 27th of August 2014 12:33:45 PM
Old 08-27-2014
Can you post a sample of what your first curl downloads and also what your first jsawk produces with this as input?

There is a second do statement in your post, that I think should not be there..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to use cygwin to run bash script

Hi, all, I try to run a quite simple bash script mytest.sh in cygwin, it's content is: #!/bin/bash echo "It is my first bash shell" there are three lines in the script. The second line is blank line. When I run it use command: bash c:/mytest.sh, ... (6 Replies)
Discussion started by: Jenny.palmy
6 Replies

2. Shell Programming and Scripting

shell / bash / script api ?

Hi is there a good dokumentation for shell scripting ? like the api in java ? didnt find a good one yet (5 Replies)
Discussion started by: Turrican
5 Replies

3. UNIX for Dummies Questions & Answers

GitHub documentation :: GitHub for dummies

Hi I wish to "develop" for brew. It is hosted on GitHub. What book (or online documentation) do you recommend me for GitHub and/or Git? Prefer small physical book. (1 Reply)
Discussion started by: slashdotweenie
1 Replies

4. Shell Programming and Scripting

How to start powershell with shebang from windows/cygwin/bash?

I would like to the the windws8/cygwin/bash shebang feature to start a powershell script. I do a "chmod +x set-sound.ps1" and then at a bash prompt I do ./set-sound.ps1 The first line of ./set-sound.ps1 #!powershell.exe -ExecutionPolicy unrestricted The result is the result: ... (5 Replies)
Discussion started by: siegfried
5 Replies

5. Shell Programming and Scripting

How to define a variable in a BASH script by using a JSON file online?

Hello, I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online: https://s3.amazonaws.com/Minecraft.Download/versions/versions.json Within that JSON, I 'm looking for... (4 Replies)
Discussion started by: nbsparks
4 Replies

6. Shell Programming and Scripting

Bash Script to pull ipa server name on 500 servers

Hello All, I need help writing a bash script that will run on 500 LINUX servers and do the following: 1. Capture the ipa_server name from /etc/sssd/sssd.conf on a list of 500 servers in the ipahosts file. 2. Write to a file outputing only server name and IPA server name. Root ssh keys... (3 Replies)
Discussion started by: vtowntechy
3 Replies

7. Shell Programming and Scripting

Parsing and Editing a json file with bash script

I am trying to automate editing of a json file using bash script. The file I initially receive is { "appMap": { "URL1": { "name": "a" }, "URL2": { "name": "b" }, "URL3": { "name": "c" }, } WHat I would like to do is replace... (5 Replies)
Discussion started by: Junaid Subhani
5 Replies

8. UNIX for Advanced & Expert Users

Running Powershell Script from Linux through Cygwin

Hello Experts, I am creating a run time powershell script on Linux machine and copying that powershell script to Windows machine. To connect to windows through "ssh", I am using Cygwin tool. To make the connection password less I copied my public in authorized_keys in windows Administrator... (5 Replies)
Discussion started by: shekhar_4_u
5 Replies

9. Shell Programming and Scripting

Building JSON command with bash script

Hello. I'm new to bash script and I'm learning the basics by writing some scripts. Recently a friend of mine asked me if I could try to write a script to him to automate a couple of processes that uses JSON RPCs. I'll try to explain in few words the workflow just to contextualize the problem.... (48 Replies)
Discussion started by: psysc0rpi0n
48 Replies

10. UNIX for Beginners Questions & Answers

Parse property from json file

Hello All, Greetings.. I have a json file that I need to pase its URLs and other values. The match should start with "notifications" and output URLs and settings values. I tried with python or awk but hardly could get URLs only. Or whole URLs from full json file. Could not match... (2 Replies)
Discussion started by: 7adi
2 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 04:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy