LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2011, 01:33 PM   #1
jmvidalvia
LQ Newbie
 
Registered: Mar 2011
Posts: 23

Rep: Reputation: 0
Split .bashrc in two files


Hi all!
I use linux from different computers, and have my dotfiles synced with Dropbox, after creating local symlinks to them.
Sometimes the configuration of .bashrc shouldn't be exact in different machines, and I was considering if it is possible to create something like an .aliasrc, remove all aliases from .bashrc and add something like
Code:
source ~/.aliasrc
at the end.
¿?
Thanks!
 
Old 12-17-2011, 03:11 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Yes. It's possible.

More info here --> http://www.gnu.org/s/bash/manual/html_node/index.html

Last edited by weibullguy; 12-17-2011 at 03:17 PM.
 
Old 12-17-2011, 03:35 PM   #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
This is common to many Linux flavors. For example inside .bashrc in my OpenSuSE box I have the following line:
Code:
test -s ~/.alias && . ~/.alias || true
that checks if file .alias exists and has a size greater than zero and source it accordingly.
 
Old 12-18-2011, 05:42 AM   #4
jmvidalvia
LQ Newbie
 
Registered: Mar 2011
Posts: 23

Original Poster
Rep: Reputation: 0
Thanks.
Regarding the bash manual, I would appreciate to know which is the topic I sould investigate.
I've been googling quite a bit under "bash source" and similar expressions without success.
Not asking for the answer, but for the path...
Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to edit .bash_profile and .bashrc files? LinuxInfo Programming 9 07-21-2012 09:19 AM
How to cusromize .bashrc and other files SeRGeiSarov Linux - Software 5 12-19-2009 06:52 AM
PHP/Java/Anything that can split files, while files stay on Server? Lamborghini Kid Linux - Software 1 04-27-2007 04:53 PM
how does one use DD to recombine files from using pipe to split files originally? nerdful1 Linux - General 3 03-28-2006 07:46 AM
I have no .bashrc files -- in any accounts W0bbles Linux - General 4 02-01-2006 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:33 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