* bash load
@ 2008-07-18 14:02 r
2008-07-18 14:07 ` Mark J. Reed
2008-07-18 14:10 ` Greg Chicares
0 siblings, 2 replies; 7+ messages in thread
From: r @ 2008-07-18 14:02 UTC (permalink / raw)
To: cygwin
I'm trying to set variables and aliases to /home/.bashrc
but bash doesn't read it. I tried to change
/etc/skel/.bashrc and /etc/defaults/etc/skel/.bashrc
but bash doesn't read thats too.
How can I do to make bash read my configuration file ?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:02 bash load r
@ 2008-07-18 14:07 ` Mark J. Reed
2008-07-18 14:56 ` r
2008-07-18 14:10 ` Greg Chicares
1 sibling, 1 reply; 7+ messages in thread
From: Mark J. Reed @ 2008-07-18 14:07 UTC (permalink / raw)
To: cygwin
That's a general bash question, not Cygwin-specific; I recommend looking here:
http://www.faqs.org/faqs/unix-faq/shell/bash/
But the short answer is that bash reads either .bashrc (non-login
shell) or .bash_profile (login shell), but not both. If you want the
stuff in your .bashrc to be loaded in a login shell, you need to
source it explicitly inside your .bash_profile via something like
this:
. "${HOME}"/.bashrc
Also make sure that the .bash files are in your actual home directory,
which is usually not /home but /home/YourUserName...
--
Mark J. Reed <markjreed@gmail.com>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:02 bash load r
2008-07-18 14:07 ` Mark J. Reed
@ 2008-07-18 14:10 ` Greg Chicares
1 sibling, 0 replies; 7+ messages in thread
From: Greg Chicares @ 2008-07-18 14:10 UTC (permalink / raw)
To: cygwin
On 2008-07-18 14:01Z, r wrote:
> I'm trying to set variables and aliases to /home/.bashrc
> but bash doesn't read it. I tried to change
> /etc/skel/.bashrc and /etc/defaults/etc/skel/.bashrc
> but bash doesn't read thats too.
> How can I do to make bash read my configuration file ?
Type
man bash
and then type
/.bashrc
to search for '.bashrc'. That'll tell you where to put it.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:07 ` Mark J. Reed
@ 2008-07-18 14:56 ` r
2008-07-18 14:59 ` Christopher Faylor
0 siblings, 1 reply; 7+ messages in thread
From: r @ 2008-07-18 14:56 UTC (permalink / raw)
To: cygwin
> But the short answer is that bash reads either .bashrc (non-login
> shell) or .bash_profile (login shell), but not both. If you want the
> stuff in your .bashrc to be loaded in a login shell, you need to
> source it explicitly inside your .bash_profile via something like
> this:
>
> . "${HOME}"/.bashrc
>
> Also make sure that the .bash files are in your actual home directory,
> which is usually not /home but /home/YourUserName...
>
Ok, it seems is solved putting .bash_profile in my $HOME dir.
But when I lunch cygwin before to appear bash login it appares
error messages :
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
': not a valid identifier
bash: $'\r': command not found
bash: $'\r': command not found
': not a valid identifier
bash: $'\r': command not found
': not a valid identifier_DIR
bash: $'\r': command not found
bash: $'\r': command not found
': not a valid identifier
bash: $'\r': command not found
': not a valid identifier
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
bash: $'\r': command not found
Do you know why ?
my .bash_profile is
# base-files version 3.7-1
# To pick up the latest recommended .bash_profile content,
# look in /etc/defaults/etc/skel/.bash_profile
# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.
# ~/.bash_profile: executed by bash for login shells.
# source the system wide bashrc if it exists
if [ -e /etc/bash.bashrc ] ; then
source /etc/bash.bashrc
fi
# source the users bashrc if it exists
if [ -e "${HOME}/.bashrc" ] ; then
source "${HOME}/.bashrc"
fi
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH=${HOME}/bin:${PATH}
# fi
# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
# MANPATH=${HOME}/man:${MANPATH}
# fi
# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
# INFOPATH=${HOME}/info:${INFOPATH}
# fi
Instead my .bashrc ( post just active records )
# Some shortcuts for different directory listings
alias ls="ls -hF --color=tty" # classify files in colour
alias dir="ls --color=auto --format=vertical"
alias vdir="ls --color=auto --format=long"
# alias ll='ls -l' # long list
# alias la='ls -A' # all but . and ..
# alias l='ls -CF'
#
NNTPSERVER="news.tin.it"
export NNTPSERVER
# DISPLAY="127.0.0.1:0.0"
# export DISPLAY
"SLRNHOME"=c:\slrn"
export SLRNHOME
SLRN_SLANG_DIR="c:\slrn\slang"
export
SLRN_SLANG_DIR
# SLRN_SLANG_DIR="/lib/slrn/slang"
# export SLRN_SLANG_DIR
HOSTNAME="somewhere.com"
export HOSTNAME
TMP="/tmp"
export TMP
alias getmail="getmail --rcfile getmailrc-rtrev_fw --rcfile getmailrc-
r_trev_fw --rcfile getmailrc-jcclw_fw --rcfile get mailrc-alice"
Do you know why ??
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:56 ` r
@ 2008-07-18 14:59 ` Christopher Faylor
2008-07-18 23:13 ` r
2008-07-21 11:06 ` r
0 siblings, 2 replies; 7+ messages in thread
From: Christopher Faylor @ 2008-07-18 14:59 UTC (permalink / raw)
To: cygwin
On Fri, Jul 18, 2008 at 02:56:05PM +0000, r wrote:
>
>> But the short answer is that bash reads either .bashrc (non-login
>> shell) or .bash_profile (login shell), but not both. If you want the
>> stuff in your .bashrc to be loaded in a login shell, you need to
>> source it explicitly inside your .bash_profile via something like
>> this:
>>
>> . "${HOME}"/.bashrc
>>
>> Also make sure that the .bash files are in your actual home directory,
>> which is usually not /home but /home/YourUserName...
>>
>
>
>Ok, it seems is solved putting .bash_profile in my $HOME dir.
>But when I lunch cygwin before to appear bash login it appares
>error messages :
>
>bash: $'\r': command not found
You edited the file with an editor that adds CRLF line endings.
Use d2u to remove the "\r"s.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:59 ` Christopher Faylor
@ 2008-07-18 23:13 ` r
2008-07-21 11:06 ` r
1 sibling, 0 replies; 7+ messages in thread
From: r @ 2008-07-18 23:13 UTC (permalink / raw)
To: cygwin
Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com> writes:
> You edited the file with an editor that adds CRLF line endings.
>
> Use d2u to remove the "\r"s.
>
> cgf
ok I'll try on monday in office
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bash load
2008-07-18 14:59 ` Christopher Faylor
2008-07-18 23:13 ` r
@ 2008-07-21 11:06 ` r
1 sibling, 0 replies; 7+ messages in thread
From: r @ 2008-07-21 11:06 UTC (permalink / raw)
To: cygwin
On 2008-07-18, Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com> wrote:
> On Fri, Jul 18, 2008 at 02:56:05PM +0000, r wrote:
>>
>>> But the short answer is that bash reads either .bashrc (non-login
>>> shell) or .bash_profile (login shell), but not both. If you want the
>>> stuff in your .bashrc to be loaded in a login shell, you need to
>>> source it explicitly inside your .bash_profile via something like
>>> this:
>>>
>>> . "${HOME}"/.bashrc
>>>
>>> Also make sure that the .bash files are in your actual home directory,
>>> which is usually not /home but /home/YourUserName...
>>>
>>
>>
>>Ok, it seems is solved putting .bash_profile in my $HOME dir.
>>But when I lunch cygwin before to appear bash login it appares
>>error messages :
>>
>>bash: $'\r': command not found
>
> You edited the file with an editor that adds CRLF line endings.
>
> Use d2u to remove the "\r"s.
>
> cgf
>
great, its done
rgrd
r
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-21 11:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-18 14:02 bash load r
2008-07-18 14:07 ` Mark J. Reed
2008-07-18 14:56 ` r
2008-07-18 14:59 ` Christopher Faylor
2008-07-18 23:13 ` r
2008-07-21 11:06 ` r
2008-07-18 14:10 ` Greg Chicares
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).