delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/18/10:56:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: r <r DOT trev_ AT inwind DOT it>
Subject: Re: bash load
Date: Fri, 18 Jul 2008 14:56:05 +0000 (UTC)
Lines: 150
Message-ID: <loom.20080718T142229-58@post.gmane.org>
References: <loom DOT 20080718T135836-836 AT post DOT gmane DOT org> <f60fe000807180707g6f4ca48dx3f98f66db2bc588b AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019