delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/10/15/13:51:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Mon, 15 Oct 2007 13:50:50 -0400
Message-Id: <200710151750.l9FHooDE026151@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <005501c80f51$e2dcfc00$0300a8c0@desktop2>
(neil DOT foster2007 AT tiscali DOT co DOT uk)
Subject: Re: bash 2.05b
References: <005501c80f51$e2dcfc00$0300a8c0 AT desktop2>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

>     I just installed bash 2.05b but I can't figure out how to get it to read 
> bashrc. I have djgpp env var set to point to /djgpp and I but bash in 
> /djgpp/bin. Does this mean that  /etc/profie should be in /etc/profile or 
> /djgpp/etc/profile and should it pick up the ashrc file from the user home 
> directory or from /djgpp?

You need to pass either --login or -i (see the manual for the
difference) to make bash read startup files.

> Also do yo need to put #! in the first line as the example scripts
> do. This seems to be necessary to get a script to work.

Yes, djgpp looks at those to figure out which interpreter to use.

> I'm also having problems getting aliases to work I do a command like
> 
> alias cls="cmd /c cls" from the bash command line and it works fine but I 
> can't get ti to work in a bash script?

bash scripts don't inherit aliases, nor do they read the startup files.
You have to dot them manually (like ``. $HOME/.bashrc'')

- Raw text -


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