Re: file command bug on windows
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Sat, 04 Apr 2009 09:25:53 -0500
solar wrote:
On Mar 30, 12:50 pm, suchenwi <richard.suchenwirth-
bauersa...@xxxxxxxxxxx> wrote:
On 29 Mrz., 20:21, solar <solaradmin2...@xxxxxxxxx> wrote:
This has not to do with the file command, but with Tcl's file name% file type ~123
user "123" doesn't exist
% file type ~456
user "456" doesn't exist
% cd ~456
user "456" doesn't exist
resolution of ~ (as evident from the cd error). If filenames starting
with ~ are allowed in your application, you can sanitize them with
code like this:
% regsub {^~} ~456~78 ./&
./~456~78
Thanks for the solution. That will work...
But I was just wanted to know if "file", "cd", etc. should have been
written
to ignore interpreting "~dir" as a user's home directory.
No, why would you want to do that -- each user has a valid home directory.
BTW, on most other file systems you can also put a tilde in a file name. Just like on windows it is very very very rarely put at the beginning of a file name (one of the common *inx editors, Emacs, puts it at the end of a file name to indicate a backup file).
--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: file command bug on windows
- From: solar
- Re: file command bug on windows
- References:
- Re: file command bug on windows
- From: solar
- Re: file command bug on windows
- Prev by Date: Problem sourcing files in child interpreters in Starkit
- Next by Date: Re: Problem sourcing files in child interpreters in Starkit
- Previous by thread: Re: file command bug on windows
- Next by thread: Re: file command bug on windows
- Index(es):
Relevant Pages
|