Re: file command bug on windows



solar wrote:
On Mar 30, 12:50 pm, suchenwi <richard.suchenwirth-
bauersa...@xxxxxxxxxxx> wrote:
On 29 Mrz., 20:21, solar <solaradmin2...@xxxxxxxxx> wrote:

% file type ~123
user "123" doesn't exist
% file type ~456
user "456" doesn't exist
% cd ~456
user "456" doesn't exist
This has not to do with the file command, but with Tcl's file name
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|
+------------------------------------------------------------------------+
.



Relevant Pages

  • Re: LONEOS Discovers Asteroid with the Smallest Orbit (2004 JG6)
    ... The solar telescopes producing the best images have ... >> very high spectral resolution (spectrographs having a spectral resolution of ... >For transit observations, many minutes or hours of data could be ...
    (sci.astro)
  • Re: Printing an image to scale
    ... image at the same resolution and using the same file type ... export and get a similarly sized image. ... The image is true color. ...
    (comp.soft-sys.matlab)
  • Re: Before the nonsense breaks out
    ... 24 hours and without exception requires the calendar system of 3 years/ ... Since the hour is defined as 1/24th of the mean solar day, ... I would call this an "exact match within the resolution of available data", ... of, and compensation for, measurable variations in the clocks themselves. ...
    (sci.astro.amateur)
  • Re: Printing an image to scale
    ... image at the same resolution and using the same file type ... export and get a similarly sized image. ...
    (comp.soft-sys.matlab)
  • Re: file command bug on windows
    ... resolution of ~ (as evident from the cd error). ... written to ignore interpreting  "~dir" as a user's home directory on Windows. ...
    (comp.lang.tcl)