[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Naming convention of bash script filenames
From: |
Bob Proulx |
Subject: |
Re: Naming convention of bash script filenames |
Date: |
Sun, 11 Jul 2010 19:25:10 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Peng Yu wrote:
> For an executable bash script I use the suffix .sh. For a bash script
> that is only source-able but runnable, I use the suffix .bashrc.
>
> People may use different conventions. I just want to see what most
> people use and follow the common practice. Could anybody give me any
> suggestions?
For an executable script I use no suffix at all. It matters not if
the script is a bash script, sh, ksh, perl, ruby, or whatever. The
caller shouldn't care. Something I start off writing as a shell
script may over the course of time get refactored into a perl or ruby
script. Or a perl script written by other people may really be
nothing more than a command launcher in which case I have often
refactored it into a simple shell script. Many of the programs in
/bin and /usr/bin have been shell scripts or compiled executables at
different stages in their lifetimes and it did not matter to the
callers as long as the interface remained stable.
Bob