delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/05/31/17:46:54

From: franl AT world DOT std DOT com (Francis Litterio)
Subject: [b18] Bash does not expand ~ and $HOME the same
31 May 1997 17:46:54 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199705312355.AA10752.cygnus.gnu-win32@world.std.com>
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

I just noticed this bash oddity (with c:/ mounted as /):

	bash$ echo $HOME
	/franl
	bash $ echo ~
	c:/franl

Isn't ~ supposed to expand to the current value of the variable HOME?

Can anyone see how this might break an existing shell script?
--
Francis Litterio                           PGP Key Fingerprint:
franl AT world DOT std DOT omit-this DOT com              02 37 DF 6C 66 43 CD 2C
http://world.std.omit-this.com/~franl/     10 C8 B5 8B 57 34 F3 21
Note: email address and WWW URL altered to prevent spam.

"They that can give up essential liberty to obtain a little temporary 
 safety deserve neither liberty nor safety." -- Ben Franklin, ~1784

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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