Insomniactoo | 22 Apr 16:10 2012
X-Face

bash and bashrc...

Hi gang,

  I've made up (actually it's a stolen very small part of an bashrc I found on 
my openSUSE partition that I like a heck of a lot) a small bashrc.

  I saved it in my /home dir as a hidden file as .bashrc

  Unfortunately it's not being read or used by bash.

  Where should I put this thing or label it to have bash read it and use it as 
needed?

  Here's what it holds:

-----
	#
	# Set some generic aliases
	#
	alias o='less'
	alias ..='cd ..'
	alias ...='cd ../..'
	alias cd..='cd ..'
	alias rd=rmdir
	alias md='mkdir -p'
-----

  Thanks for any help with this. I've read man bash but it's an awful lot to 
figure out and wasn't much help.

  JB
(Continue reading)

John Crowhurst | 22 Apr 16:06 2012
Picon

Re: bash and bashrc...

Create a .bash_profile with:

. ~/.bashrc

And that should solve your problem.

Best,

John

On 22/04/2012 15:10, Insomniactoo wrote:
> Hi gang,
>
>   I've made up (actually it's a stolen very small part of an bashrc I found on 
> my openSUSE partition that I like a heck of a lot) a small bashrc.
>
>   I saved it in my /home dir as a hidden file as .bashrc
>
>   Unfortunately it's not being read or used by bash.
>
>   Where should I put this thing or label it to have bash read it and use it as 
> needed?
>
>   Here's what it holds:
>
> -----
> 	#
> 	# Set some generic aliases
> 	#
> 	alias o='less'
(Continue reading)

Willy Sudiarto Raharjo | 22 Apr 16:33 2012
Picon

Re: bash and bashrc...

> Create a .bash_profile with:
>
> . ~/.bashrc
>
> And that should solve your problem.

>>   I've made up (actually it's a stolen very small part of an bashrc I found on
>> my openSUSE partition that I like a heck of a lot) a small bashrc.
>>
>>   I saved it in my /home dir as a hidden file as .bashrc
>>
>>   Unfortunately it's not being read or used by bash.
>>
>>   Where should I put this thing or label it to have bash read it and use it as
>> needed?

or put the alias code in .bashrc

--

-- 
Willy Sudiarto Raharjo
Personal Blog : http://willysr.blogspot.com
Linux Blog: http://slackblogs.blogspot.com
Claudio Fontana | 22 Apr 17:16 2012
Picon

Re: bash and bashrc...

Hello,

On Sun, Apr 22, 2012 at 4:10 PM, Insomniactoo <Insomniactoo <at> localnet.com> wrote:
> Hi gang,
>
>  I've made up [...]a small bashrc.
>  I saved it in my /home dir as a hidden file as .bashrc
>  Unfortunately it's not being read or used by bash.
>
>  Where should I put this thing or label it to have bash read it and use it as
> needed?
>

.bashrc is read by bash when an interactive, non-login shell is
started as "bash".
.bashrc is not read for the login shell, or if the shell is started as
"sh", or if an option is explicitly chosen.

For all details, see

$ info bash
CTRL+S bashrc [ CTRL+S, CTRL+S, ...]

also see chapter 6.2 "Bash Startup Files"

You _may_ want to load your bashrc from your ~/.profile or ~/.bash_profile.
I personally use a different setup[...]
Btw I would suggest against heavy use of aliases. Ciao

>  Here's what it holds:
(Continue reading)

Insomniactoo | 22 Apr 17:50 2012
X-Face

Re: bash and bashrc...SOLVED

On Sunday, 22 April 2012 09:10 Insomniactoo wrote:

> Hi gang,
> 
>   I've made up (actually it's a stolen very small part of an bashrc I found
> on my openSUSE partition that I like a heck of a lot) a small bashrc.
> 
>   I saved it in my /home dir as a hidden file as .bashrc
> 
>   Unfortunately it's not being read or used by bash.
> 
>   Where should I put this thing or label it to have bash read it and use it
> as needed?
> 
>   Here's what it holds:
> 
> -----
> 	#
> 	# Set some generic aliases
> 	#
> 	alias o='less'
> 	alias ..='cd ..'
> 	alias ...='cd ../..'
> 	alias cd..='cd ..'
> 	alias rd=rmdir
> 	alias md='mkdir -p'
> -----
> 
>   Thanks for any help with this. I've read man bash but it's an awful lot
> to figure out and wasn't much help.
(Continue reading)


Gmane