Sponsored Content
Top Forums Shell Programming and Scripting Fun with terminal plotting JSON data at the command line Post 303043104 by Neo on Saturday 18th of January 2020 06:37:46 AM
Old 01-18-2020
Thanks for posting this, kbrazil.

Looking forward to seeing more of your projects and tutorials.

Keep 'em coming!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

like to have fun in terminal

Hai Friends I have installed FreeBSD in my system... I have installed it to work in text mode don't have the GUI. The default text color is Black background with White Foreground. I want it to be with Black background with Green Foreground. How could i do that. Thanks in advance Collins (4 Replies)
Discussion started by: collins
4 Replies

2. UNIX for Advanced & Expert Users

Gnuplot question: plotting 3D data in map view

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - map view (no 3D view) - color of each point should depend on z-value. - I want to define my own color scale - plot should... (1 Reply)
Discussion started by: karman
1 Replies

3. UNIX for Dummies Questions & Answers

Plotting Data within UNIX

I have a set of data that looks similar to the following in UNIX: 0.12_0.008_fall_ff.out:bisect return: 0.08056640625 0.12_0.04_fall_ff.out:bisect return: 0.07470703125 0.12_0.12_fall_ff.out:bisect return: 0.06298828125 0.12_0.24_fall_ff.out:bisect return: 0.05126953125 Previously I have... (4 Replies)
Discussion started by: EDALBNUG
4 Replies

4. Shell Programming and Scripting

plotting a straight horizontal line

How can I plot a straight horizontal line using perl in unix solaris environment? Please suggest. Pooja (2 Replies)
Discussion started by: wadhwa.pooja
2 Replies

5. UNIX for Dummies Questions & Answers

Help with extracting data and plotting

I have attached a txt file, what I would like to be able to do is: 1. Extract Data from Columns labeled E/N and Ko into a new file 2. Then in the new file I would like to be able to plot E/N on the X axis and Ko on the y axis. 3. Lastly I would like to be able to extract multiple data sets and... (6 Replies)
Discussion started by: gingburg
6 Replies

6. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

7. UNIX Desktop Questions & Answers

How do you reverse terminal command line to the top?

Hi All, I work on a Linux platform which runs Red Hat (forget which version) and use both korn and bash shells. Is there a way of making the command line appear at the top of the terminal window and any lists, commands or directory names etc to appear below the top, that is to say reverse the... (1 Reply)
Discussion started by: ray_m
1 Replies

8. OS X (Apple)

How to start a new terminal from command line?

Dear All, Anyone knows how to start a new bash terminal from command line? Another question: when I use "open" command (open test.pdf) to open a pdf file, the PDF reader will start up, but cannot associate with that file. Anyone knows why? (1 Reply)
Discussion started by: andrewust
1 Replies

9. OS X (Apple)

A new OSX 10.12.x terminal from the command line.

Hi guys and gals... After much searching on the good ol' internet I could find nothing, so this is the result. ALthough many people seem to have asked this question no-one seems to have a solution so here we go. I need for AudioScope.sh, 'xterm' to run a second program for some of its... (2 Replies)
Discussion started by: wisecracker
2 Replies

10. Shell Programming and Scripting

Split JSON to different data files

Hi Gurus, I have below JSON file, now I want to rewrite this file into a new file. I will appreciate if anyone can help me to provide the solution...I can't use jq. { "_id": "3ad893cb4cf1560add7b4caffd4b6126", "_rev": "1-1f0ce165e1d210319cf6e9f9c6ff654f", "name":... (4 Replies)
Discussion started by: manas_ranjan
4 Replies
RIVESCRIPT(1p)						User Contributed Perl Documentation					    RIVESCRIPT(1p)

NAME
rivescript - A command line frontend to the Perl RiveScript interpreter. SYNOPSIS
$ rivescript [options] [path to RiveScript documents] DESCRIPTION
This is a command line front-end to the RiveScript interpreter. This script obsoletes the old "rsdemo", and can also be used non- interactively by third party programs. To that end, it supports a variety of input/output and session handling methods. If no RiveScript document path is given, it will default to the example brain that ships with the RiveScript module, which is based on the Eliza bot. OPTIONS
--debug, -d Enables debug mode. This will print all debug data from RiveScript to your terminal. If you'd like it to log to a file instead, use the "--log" option instead of "--debug". --log FILE Enables debug mode and prints the debug output to "FILE" instead of to your terminal. --json, -j Runs "rivescript" in JSON mode, for running the script in a non-interactive way (for example, to use RiveScript in a programming language that doesn't have a native RiveScript library). See "JSON Mode" for details. --strict, --nostrict Enables strict mode for the RiveScript parser. It's enabled by default, use "--nostrict" to disable it. Strict mode prevents the parser from continuing when it finds a syntax error in the RiveScript documents. --depth=50 Override the default recursion depth limit. This controls how many times RiveScript will recursively follow redirects to other replies. The default is 50. --help Displays this documentation in your terminal. USAGE
Interactive Mode This is the default mode used when you run "rivescript" without specifying another mode. This mode behaves similarly to the old "rsdemo" script and lets you chat one-on-one with your RiveScript bot. This mode can be used to test your RiveScript bot. Example: $ rivescript /path/to/rs/files JSON Mode This mode should be used when calling from a third party program. In this mode, data that enters and leaves the script are encoded in JSON. Example: $ rivescript --json /path/to/rs/files The format for incoming JSON data is as follows: { "username": "localuser", "message": "Hello bot!", "vars": { "name": "Aiden" } } Here, "username" is a unique name for the user, "message" is their message to the bot, and "vars" is a hash of any user variables your program might be keeping track of (such as the user's name and age). The response from "rivescript" will look like the following: { "status": "ok", "reply": "Hello, human!", "vars": { "name": "Aiden" } } Here, "status" will be "ok" or "error", "reply" is the bot's response to your message, and "vars" is a hash of the current variables for the user (so that your program can save them somewhere). End of Message There are two ways you can use the JSON mode: "fire and forget," or keep a stateful session open. In "fire and forget," you open the program, print your JSON input and send the EOF signal, and then "rivescript" sends you the JSON response and exits. In a stateful session mode, you must send the text "__END__" on a line by itself after you finish sending your JSON data. Then "rivescript" will process it, return its JSON response and then also say "__END__" at the end. Example: { "username": "localuser", "message": "Hello bot!", "vars": {} } __END__ And the response: { "status": "ok", "reply": "Hello, human!", "vars": {} } __END__ This way you can reuse the same pipe to send and receive multiple messages. SEE ALSO
RiveScript, the Perl RiveScript interpreter. AUTHOR
Noah Petherbridge, http://www.kirsle.net LICENSE
RiveScript - Rendering Intelligence Very Easily Copyright (C) 2011 Noah Petherbridge This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.14.2 2012-05-29 RIVESCRIPT(1p)
All times are GMT -4. The time now is 12:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy