LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2009, 03:44 AM   #1
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 318

Rep: Reputation: 40
what does : & . mean in bashrc


Greetings,

i will like to ask what does ; mean in the bashrc file?

does it means it is a separator in unix?

And what about . in the bashrc?

What does it means in unix

Thanks
 
Old 01-08-2009, 04:03 AM   #2
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 641

Rep: Reputation: 36
Quote:
Originally Posted by vitalstrike82 View Post
i will like to ask what does ; mean in the bashrc file?
does it means it is a separator in unix?
The ; is the command separator, so that you can for instance cd to a directory and list it's files by typing
Code:
cd directory;ls
It's common to most of the shells, and not unique to the bashrc file. I use it frequently on the command-line when I'm in a hurry to put multiple commands together before I press enter.

QUOTE=vitalstrike82;3400879]
And what about . in the bashrc?
[/QUOTE]
The . in the beginning of the file means it's a "hidden" file. This is not unique to bash. You can try it yourself. When in your homedirectory and you type ls, you cannot see the "dot"-files such as .bashrc, but if you type ls -a (list all files), these will show.

I recommend having a look at the bash manpage, or maybe this one for starters: http://www.hypexr.org/bash_tutorial.php

-y1
 
Old 01-08-2009, 04:09 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Well, it depends on the context. The semicolon ; is the command separator which let you run two commands on the same line. The dot . can be either
1) the equivalent of the source built-in
2) the current working directory
3) the single character match in a regular expression
Since you've found it in .bashrc I guess the first definition fits. When you "source" a file, all the statements in it are executed in the current shell. Useful to set the environment and retain the assigned environment variables in the current shell.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM
.bashrc & startup questions Randle2I Slackware 10 03-09-2007 12:41 AM
aterm .Xdefaults & .bashrc jipe Linux - Software 8 10-30-2004 09:19 AM
bash env vars alias's & .bashrc micxz Linux - General 8 10-08-2003 02:09 PM
bash_profile & bashrc c1p3r Linux - Newbie 0 07-15-2003 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration