Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
ok, with my psychic hat on, i'm guessing you visually copied the original example into your own .bashrc? you probably have used backticks instead of quote marks, i.e. ` instead of '. doing backticks means that the contents will be executed, and tso that first [ is being executed, and as [ is an alias of the test command, you have a test error. changes them for regular single quote marks.
this would be a directory under /etc , named "." (point) which holds the file "bash_completion"
While the "." should point back to the directory itself - it is redundant and useless at best
- give the correct path name...
Both of these are the same thing:
or source /etc/bash_completion
Do you really want to run the bash_completion program, which I assume is a Bash script?
If that is supposed to change some environment variables for all your bash shells, then you need
to "source" the script rather than executing it.
"sourcing" includes the code of bash_completion script in your .bashrc (as if the code is copy-pasted into the .bashrc). This will also run the code, but change the environment of your bash shells.
Just executing the bash_completion script (not sourcing it), will only make it change it's own environment instead of the environment of all subsequent programs and shells.
If you want to have the functions of bash_completion available you dont run this script - as has been pointed out more than once - the reasons too.
You can't run it because it is no shell-script - it just contains the functions...
You "source" it (make the funktions available inside bash) by including either one of the lines I gave here as an example into your personal .bash_profile or .basrc,
or system-wide by putting these lines into /etc/profile
It is just a typo in what you have now.