VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

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

Locator

  • Vectorian
  • ****
  • Posts: 778
[ SOLVED ] .bash file useage help please.
« on: May 29, 2014, 01: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, 12:07:58 pm by Locator »
Logged

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2880
    • The Linux Works
Re: .bash file useage help please.
« Reply #1 on: May 29, 2014, 02:18:27 pm »

.bash?  Do you mean .bashrc or .bash_profile?
Logged
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: 629
  • move the needle
Re: .bash file useage help please.
« Reply #2 on: May 29, 2014, 08: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.
Logged
Robert
VL 7.1 Light

Locator

  • Vectorian
  • ****
  • Posts: 778
Re: .bash file useage help please.
« Reply #3 on: June 02, 2014, 12:07:19 pm »

Thank you.
Logged