From: jqb AT netcom DOT com (Jim Balter) Subject: Re: HOME and bash 23 Jan 1997 19:31:14 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32E80636.54FE.cygnus.gnu-win32@netcom.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (WinNT; I) Original-To: Ron Forrester Original-CC: "'Gnu-Win32'" Original-Sender: owner-gnu-win32 AT cygnus DOT com Ron Forrester wrote: > > I just installed b17.1, and so far things are overall really great! > > However, I am trying to get the ~/ functionality from bash that I am > used to. In my .bashrc file, I have the following line: > > export HOME=/usr/rjf > > which is indeed where I want ~ to point. > > After starting up bash, I see that the above is really in my > environment. Issuing the command cd ~/source, bash goes away for a while > (30+ seconds), then comes back with: > > bash: c:usrrjf/source: No such file or directory Somewhere your HOME is being defined as c:\usr\rjf, and bash ignores the backslashes, yielding "c:usrrjf". What exactly does your .bashrc contain? If it contains any carriage returns, you have hit an infamous bug, discussed recently on this list. Compare ls -l .bashrc to wc .bashrc; if they report different character counts, you have the problem. You can filter out the CR's with any of various tools (not including tr, related to the same (text mode) problem, sigh), get the patch recently posted here, mount c: with the -b flag if you know what you are doing and are brave, or write a filter using some simple C code like while ((c = getchar()) != EOF) if (c != '\r') putchar(c); [SOAPBOX MODE] Right now, there are dozens of bugs in the tools and their use due to text mode. I suggest that this is an area that could use some careful rethinking. My own opinion is that the tools should default to binary mode but should open in text mode when a filename has some special form, such as crnl:foo or dos:foo. This wouldn't allow text opens via shell redirection, but that would be a small price to pay to make od, tr, gzip, tar, cat, etc. ad nauseam work properly with redirection. -- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".