From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16903 invoked by alias); 1 Nov 2013 02:59:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18084 Received: (qmail 15919 invoked from network); 1 Nov 2013 02:59:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=T/yFrUyhJ7tQPWDNJpGk2cl1cml2fMlEFm2fb6O9Mo0=; b=ZS3jJvj2pkpzekIDFvtVpqYI7Ntm1LsOjbpiw9ja+HmRWbO+q4aaaFiNK7G3+K+bga Xn/75X1xZCI4VKJ1ct7v7FCq+eXnav+APhU/HFfuZbeNnQkiCkAPuVn9Wo+kQ2mKQcmx gH4iqRRCbziACMAZ6kN3UKUFe280DivUo5/PXUI5s3+gkMgBlY/yqRjTEu08YTyD2OMO MUhB/N18+BGHEO4+GLLIinUt53JnVbioX0n1vWvS+yUfKGb6hiGmKw0D4dklv4LkYwwB VHIjUMbTmUt39IkEzJRMA11yVzv+i5bL9NfiDWh+IZY7GwKi21UwN1kUnAu3lPaBTiCi aSOg== MIME-Version: 1.0 X-Received: by 10.50.154.101 with SMTP id vn5mr714114igb.35.1383274760806; Thu, 31 Oct 2013 19:59:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Nov 2013 00:59:20 -0200 Message-ID: Subject: Re: How to parse JavaScript from Zsh? From: Thiago Padilha To: TJ Luoma Cc: Zsh-Users List Content-Type: multipart/alternative; boundary=047d7bd76b16beb68704ea14c042 --047d7bd76b16beb68704ea14c042 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Parsing a complex language like javascript is not the job for a shell language Perhaps they are sending just JSON and you mistake with javascript? If its just json you can try this https://github.com/micha/jsawk it targets bash but should work with zsh. On Thu, Oct 31, 2013 at 11:52 PM, TJ Luoma wrote: > Long story short=E2=80=A6 my home network is satellite Internet. It has a > 20gb/month quota (not a typo). I used to be able to parse the output > of http://192.168.0.1 using `lynx` but they =C3=BCpgraded their system an= d > now http://192.168.0.1 uses JavaScript to deliver the information. > > I can't figure out how to parse JavaScript from a Zsh script. > > Ok, I admit that this is skirting on the edge of Zsh here, but I've > been googling for a couple hours and don't seem to be finding anything > close to a solution. Maybe just haven't found the right keywords, but > I'm getting a ton of unrelated crap. > > I'm guessing there's some tool out there like `lynx` or `wget` or > `curl` which can parse JavaScript from the command line, but I can't > find whatever it is. > > So I'm hoping maybe someone here has already reached the top of this > mountain and can point me in the right direction. > > TjL > --047d7bd76b16beb68704ea14c042--