Develop on linux, make life easier (Some scripts inside)

I've recently fully switched to developing exclusively on Linux as my desktop environment.  I've always enjoyed some of the benefits when working under Linux, but after the past 7 months, I've noticed a substancial increase in productivity.

I started in Ubuntu 8.04, but never fully commited.  Revisited the idea in Ubuntu 10.04, tried several other distros like Fedora, Mandriva, and several gnome or KDE variations of GUI's for each.
*Disclaimer*: I am extremely biased to Gnome, especially now with Gnome 3.  Sorry KDE, I'm trying to get away from Windows & having to use my mouse so much, not use it to click different looking icons.

Currently I'm working on Ubuntu 12.04, with a GUI swap for Gnome 3.6.  It is like my dream OS, but enough about that, aside from the environment, I find it's so much easier to get technical things done in Linux than Windows.

Like a wise friend of mine said, "In a visual/GUI based OS, you are limited to what you can see... in a command line, you are limited to what you know".  I realize there are interesting solutions to better shells in Windows, but it doesn't seem to remotely compare to what you can do in Linux terminal, once you know all the tricks.

With that said, I thought I'd post some of my favorite scripts I use on a regular basis to speed up common tasks.  I'm going to start with one for now and add more later.

I give you, drastik-module (rename to your liking):


if [ -z $3 ]
    echo -e "3rd argument was empty.  Using Drupal 7 version. \nAvaiable options: 5, 6, 7, 8 etc."
mkdir $1
cd $1
touch $1.module
touch README.txt
echo "name = $2
description = $2 module
core = $version.x
version = $version.x-1.x-dev" > $

Linux junkies will immediately see what this simple script is for.  It creates an empty module for Drupal to begin working from.  It takes 2 arguments, with an optional third:

  1. machine_name of module.
  2. Human Name of module.
  3. Drupal version (5,6,7,8 etc).

Example usage:  drastik-module my_module "My super cool module" 7
That would spit out:

  • Folder my_module  and files inside:
  • my_module/README.txt
  • my_module/my_module.module
  • my_module/   pre-populated with what Drupal needs to know to get started and enable the module right away.
    • name = My super cool module
    • description = My super cool module module
    • core = 7.x
    • version = 7.x-1.x-dev
More to come, Enjoy!
Joshua Walker