Sourcing a Directory (Solved)

Matthew S-H mathbymath at aol.com
Mon Jun 13 13:09:46 UTC 2005


On Jun 13, 2005, at 7:36 AM, Dennis Kaarsemaker wrote:
> On ma, 2005-06-13 at 13:17 +0200, Morten W. J. wrote:
>>> for file in ~/.bash_profile_pieces/*; do source $file; done
>> That will work for directories with few files, but eventually
>> your ./xyz/abc/*
>> URL might expand to more arguments than you shell can handle. That  
>> will break the script.
> How many files do you think a .bash_profile_parts will be?? If the
> matching breaks, what about all the sourcing that needs to be done...
>
> If this won't wotk i would rather go for run-parts (there is a run- 
> parts
> that works on non-executable files in /etc/X11/Xsession)

Thank you very much to all.  I found the answer I was looking for.   
It involved a little bit of tweaking of "for file in  
~/.bash_profile_pieces/*".  I now have a nice script and a modulized  
".bash_profile".  If anyone has any questions as to the actual setup,  
I'd be more than happy to explain.


~Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050613/7195bab5/attachment.html>


More information about the ubuntu-users mailing list