First Script

I had a go with a very simple Bash script this morning, it’s one step above “echo ‘Hello World'”.

I had been using a VBS script with windows to keep an ‘inbox’ list with that I had found here.   So I wanted to do the same with Bash.

If you’re familiar with GTD the idea is to write everything down as you think of it so you can refer to it and organize or act on it later.

Anyway, here it is:

#!/bin/bash
echo IN:
read IN
echo $IN >> ~/in.txt

Copy and paste into a text editor and save as inbox, I put it in an apps folder in my homepage which is part of my PATH: find how to do that here.

Make the file executable: in a terminal cd to the folder where the script is and type chmod +x inbox: find more info here.
I added an alias so I don’t have to type ‘inbox’ every time: edit your ~/.bashrc file to include:  alias i=’inbox’

So now in a terminal when I type ‘i’ I get a prompt ‘IN:’ whatever I type on the next line is appended to a single ‘in’ text file in my home directory to look at later.

With this, curses calendar, hierarchal notebook, and a very cool todotxt script I’m all about terminal productivity.

2 thoughts on “First Script

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.