GithubHelp home page GithubHelp logo

grand's Introduction

grand - generate random characters

Usage: grand [-switches] [length]

Switches:

-a include alphabetic characters
-n include numeric characters
-s include symbol characters
-x generate hexadecimal characters
-g generate a GUID
-h | -? print this help

If no arguments are specified, '-an 8' is assumed, which will generate a random 8-character alphanumeric string.

You can use it to generate passwords:

$ grand -ans 10
Ppzx4w~fdU

or GUIDs:

$ grand -g
83010e18-8a3a-57b0-33f7-b3235c67ce6b

or whatever you like...

Building it:

Build it by running make in the grand directory (substitute my example location with the one in which you've placed the source):

$ cd ~/src/grand
$ make
cc -std=c99 -o grand grand.c

Of course, you'll need make, and a C99 compiler to do so. GCC works well. ;)

If you don't have make, simply use the final line of the above output as your command:

$ cc -std=c99 -o grand grand.c

Installing it:

Install it by moving it to a directory in your PATH. For example:

$ mv grand ~/bin

Notes regarding usage:

  • Switches can be combined. For example, '-ans' specifies alpha + numeric + symbols.

  • Any argument without a '-' character is assumed to be the output length.

  • If '-x' is specified, any other character types (-a,-n,-s) are ignored.

  • If '-g' is specified, all other arguments are ignored.

  • GUIDs are always printed in lower-case. Don't whine, convert it to upper-case if you wish.

grand's People

Contributors

eronhennessey avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.