Bash Scripting Conventions   2 comments

Have decided to publish the infamous Bash scripting conventions.

Here they are:

Please, comment, challenge and help me modify it. I’m very open for feedback.

Posted January 28, 2013 by malkodan in Bash, Linux, System Administration

Tagged with , , , , ,

2 responses to “Bash Scripting Conventions

Subscribe to comments with RSS.

  1. Be warned, using `dialog’ may be dangerous. It does not work when you have screen without defined dimension. It emits the the diagnostic:
    “libgpm: zero screen dimension, assuming 80×25.”
    and then loops forever.
    Something like: echo -e “\n\n\n\t some message\n\n\n”
    read ANS < /dev/tty # use of /dev/tty for interactive ONLY
    case $ANS in
    [Yy]* ) Yes action
    [Nn]* ) No action
    * ) error message

    will work on any terminal/screen

    • First of all Ehud, thank you for the insightful reply.

      It sounds also like something that should be fixed in `dialog`. I do indeed suggest to use dialog, but what I actually mean is that I encourage people to use proper UIs rather than complex command line arguments and/or vague environment variables.

      Comment taken, I’ll change it soon to something a bit more clear about it. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: