/bin

Basic timesaving bash scripts

Primary LanguageShell

HBS - Handy Bash Scripts

A number of bash scripts to help you live a little longer ;)

These are basic timesaving scripts I use all the time and they were borne out of the need to be more efficient.

Motivation

  • I work a lot from the command line, and many times I want to take notes. Having to decide which of the gazillion notes app out there to use is time consuming,not to talk of switching between the terminal and whatever note app I decide to use.
  • Many times, I have to create new projects from the scratch either to try out a new concept, or teach something. I often find myself creating new project directories as well wasting time trying to figure out the right structure.
  • Sometimes I just want to unwind a little after staring at the terminal for too long. I want something not so distracting, but interesting enough to help me relax.

I decided to write shell scripts to address these concerns.

If you are anything like me, then you might find some of these useful.


  • quickstart
  • note
  • numguess
  • changextension

quickstart

A bash script that helps you quickly create standard project structures and allow you focus on development.

  • Usage:
quickstart <project-stack> <project-name>

Supported projects are:

  • AngularJS
    • Example:
    quickstart angular mySuperAwesomeProject
  • ExpressJS
    • Example:
    quickstart express mySuperAwesomeProject
  • Flask
    • Example:
    quickstart flask mySuperAwesomeProject

Support for more frameworks would be added soon

note

Who says you have to leave the convenience of your command line to take quick notes? You can easily take notes from the command line using this script.

  • Currently, all notes are stored to a notes.txt file in your home directory.

  • Updates to this script would allow you specify where notes should be saved.

  • To save a note, simply type note, then enter you note at the prompt.

note
  • To retrieve all your notes, type:
note list

changextension

A script that allows you change the extensions of all files within a directory, with a particular extension.

Say you have a directory that contains 50 .txt files and you want to change their extensions to .jsonor something else. I can't imagine attempting to do that manually. Save yourself the headache and use changextension

  • To use, simply switch to the directory containing the files and type:
changextension <current-extension> <target-extension>
  • Example Usage
changextension txt json

numguess

A simple fun game in the command line where a random number is generated by the program and you are expected to guess what the number is.

You get perks for how fast you are able to guess the number ;)

  • Usage:
numguess

Feel free to contribute to this repository. Ideas and feedback are welcome.