| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Message-ID: | <C2D7D58DBFE9D111B0480060086E96358D72BF@gftmail.gft.de> |
| From: | "Schaible, Joerg" <Joerg DOT Schaible AT gft DOT de> |
| To: | "'cygwin-list'" <cygwin AT sourceware DOT cygnus DOT com> |
| Cc: | "'Jan-Friedrich Mutter'" <mutter AT informatik DOT uni-muenchen DOT de> |
| Subject: | RE: translate UNIX path to DOS path |
| Date: | Thu, 23 Sep 1999 10:19:37 +0200 |
| MIME-Version: | 1.0 |
| X-Mailer: | Internet Mail Service (5.5.2448.0) |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id EAA06550 |
Extract from my .bashrc:
function dospath
{
local cr=$(echo -e "\r")
pushd "$1" > /dev/null 2>&1
# Use command.com to get 8.3 name,
# have to remove trailing carriage return
echo $(command.com /c cd) | sed -e s#$cr##g
popd > /dev/null 2>&1
}
function dosname
{
local p=$(dirname "$1")
local dos=$(dospath "$p")
local cr=$(echo -e "\r")
# Use command.com to get 8.3 name,
# have to remove trailing carriage return
echo $(dospath "$p")/$(cmd.exe /c dir /x /b $dos\\$(basename "$1")) |
sed -e s#$cr##g
}
Greetings
Jörg
> -----Original Message-----
> From: Jan-Friedrich Mutter [SMTP:mutter AT informatik DOT uni-muenchen DOT de]
> Sent: Thursday, September 23, 1999 10:07 AM
> To: cygwin AT sourceware DOT cygnus DOT com
> Subject: translate UNIX path to DOS path
>
> Hi,
>
> is there a program or script available which translates UNIX paths to DOS
> paths.
> E.g.:
> /proj is mounted on D:\rootdir\proj
>
> When I do a 'pwd' in /proj, I get /proj, but I need D:\rootdir\proj
>
> Thanks in advance,
> Jan.
>
> Jan-Friedrich Mutter <jmutter AT bigfoot DOT de>
> [http://www.bigfoot.com/~jmutter]
>
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |