bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Naming convention of bash script filenames


From: Chris F.A. Johnson
Subject: Re: Naming convention of bash script filenames
Date: Mon, 12 Jul 2010 00:20:06 -0400 (EDT)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

On Sun, 11 Jul 2010, Peng Yu wrote:

> Hi,
> 
> I think that that may not be a unique naming convention for bash
> script filenames. But I use the following.
> 
> 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?

   Like Bob, and for the same reasons, I do not use any suffix for a
   script once it is completed.

   I do, however, use a suffix when I'm working on a script: -sh

   I do my development on the -sh version, then copy that to the bin
   directory, without the suffix, when I've finished.

   That way, I can test the script with -sh, and continue working on
   it, without affecting the production copy.

   (The support scripts for this are in the last chapter of my first
   book, Shell Scripting Recipes".)

-- 
   Chris F.A. Johnson, <http://cfajohnson.com>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]