Please support VectorLinux!

Author Topic: [ SOLVED ] .bash file useage help please.  (Read 635 times)

Locator

  • Vectorian
  • ****
  • Posts: 756
[ SOLVED ] .bash file useage help please.
« on: May 29, 2014, 12:51:17 pm »
What is the procedure for using ".bash" files? It seems that some linux software packages use it for installing programs.
« Last Edit: June 02, 2014, 11:07:58 am by Locator »

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2876
    • The Linux Works
Re: .bash file useage help please.
« Reply #1 on: May 29, 2014, 01:18:27 pm »
.bash?  Do you mean .bashrc or .bash_profile?
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

roarde

  • Vectorian
  • ****
  • Posts: 584
  • move the needle
Re: .bash file useage help please.
« Reply #2 on: May 29, 2014, 07:01:14 pm »
 .sh files are to be interpreted by a "vanilla" Unix shell and should contain NO commands that need a certain shell (ksh, Bash, . . .) in order to run them properly.

It had become habit to tag bash scripts with the extension ".sh". Wrong! So many scripters who use bash-specific commands or syntax (or don't wish to make special efforts to see that they're not doing so) began using the extension ".bash" instead. Actually, I'd say that's an improvement.

So: If you see "myscript.bash", run it with "bash myscript.bash". You might want to look through it first though, to see if there's anything in it that you wouldn't feel comfortable running from the command line. That's what a ".bash" is, after all. A set of commands for the command line of Linux's most common user shell.

The files caitlyn mentioned are startup files bash looks for by name. Both are often referred to and are quite important -- they'll affect how Bash works.
Robert
VL Light RC 1.2

Locator

  • Vectorian
  • ****
  • Posts: 756
Re: .bash file useage help please.
« Reply #3 on: June 02, 2014, 11:07:19 am »
Thank you.