Mail Archives: cygwin-developers/1998/05/21/15:15:09
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?
Ian
- Raw text -