Skip to content

A command-line utility that shuffles items in a JSON array (from stdin)

License

Notifications You must be signed in to change notification settings

phrohdoh/json-arr-shuffle-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-arr-shuffle

A command-line utility which takes a JSON array in via stdin (a pipe), shuffles the contents, and prints the result to stdout with a trailing \n character.

License

See the LICENSE file.

Installation

Binaries for Windows, GNU/Linux, and macOS will be available from GitHub once CI/CD has been set up.

In the meantime you will need to build this tool from source.

Building from source

Assuming you have:

  • the Rust tools installed and are able to run them successfully
  • cloned this repository to your machine
  • cd-ed into the root of this repository

Run the following command (excluding the $):

$ cargo build --release

If it builds successfully you will have an executable at target/release/json-arr-shuffle that you will need to put in one of the directories on your $PATH.

Usage

$ echo "[5, 6, 7]" | json-arr-shuffle
[5,7,6]
$ echo '["hello", 6, true]' | json-arr-shuffle
[6,"hello",true]

Development

Development is done on GitHub.

Support the project financially

Please consider financially supporting the project if it has made your life easier, saved you time, etc., or as a way to say "thanks!" by becoming a Patron of the maintainer.

About

A command-line utility that shuffles items in a JSON array (from stdin)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages