www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/05/21/18:21:45

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: pathconv
21 May 1998 18:21:45 -0700 :
Message-ID: <199805220110.VAA29924.cygnus.cygwin32.developers@kramden.cygnus.com>
To: cygwin32-developers AT cygnus DOT com, ian AT cygnus DOT com

>I'd like to write a shell utility to help convert file and path names
>between win32 and POSIX format.  Being able to convert a POSIX path to
>win32 format isconvenient when invoking win32 programs from shell
>scripts.  Doing the reverse conversion seems natural as well.
>
>I propose that the program be named pathconv.
>
>Usage: pathconv [-p|--path] (-u|--unix)|(-w|--windows) filename\n\
>  -u|--unix     print Unix form of filename\n\
>  -w|--windows  print Windows form of filename\n\
>  -p|--path     filename argument is a path\n",
>
>Some proposed examples:
>
>% pathconv -u c:/foo.txt
>//c/foo.txt
>% pathconv -w //c/foo.txt
>c:\foo.txt
>% pathconv -w c:\foo.txt
>c:\foo.txt
>% pathconv -p -u /a:/b
>/a:/b
>% pathconv -p -u \a;\b
>/a:/b
>% pathconv -p -w /a:/b
>\a;\b
>% pathconv -p -w /a;/b
>\a;\b
>
>This utility would simply call the existing path conversion functions
>in the cygwin32 DLL.
>
>Does anybody have any comments on this?  Perhaps a better name, or a
>better syntax?

I like the arguments and the functionality but I wonder if it should
be called something with a 'cygnus' or 'cyg' in it just to differentiate
it.  Or, we already have a poor, underutilized cygwin32 utility.  Could
this functionality be added to that?

cgf

- Raw text -


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