Simple Question

Hi,

Please don't berate me over the simplicity of these questions. I have recently gotten into bash shell scripting and enjoy it quite a bit. One thing I have not found the answer to though is when naming a shell script, what extension is normally used (ie myscript.?)? Also where is the standard location to keep one's shell scripts. I assume that this is personal. I have created a ~/bin directory. But what do most people use? Thanks!

Mike

~/bin is a good choice. There is no standard extension, and indeed none is required. I generally don't use any, but frequently .sh is used for Bourne or BASH scripts, .ksh for Korn scripts, and .pl for PERL.

Thank you very much!

Actually there are good reasons why you should avoid having an extension, although there are some scenarios where it has some merit (e.g. when it might be beneficial for the user to know which language a command is implemented in, or when you have multiple implementations in different languages for different platforms)

i have a folder called "programing" at ~
inside that i have one for each language i did something over the last 10 years
you can find a folder called "bash" along one called "c" and "gambas" "perl" and so on
after i finish developing something , i do a simbolick link to my ~/bin folder
specially with scripts, since i migh want to go and edit something, my method keeps the ~/bin reference updated

Maybe you should call it "programming"? :slight_smile: