get cygpath to leave relative paths as relative? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

get cygpath to leave relative paths as relative?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-03-2007
fabulous2 fabulous2 is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 1 February 2014, 10:39 PM EST
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
get cygpath to leave relative paths as relative?

If I execute
mypath=`cygpath -w ../`
echo $mypath
I get
d:\unix\nextVersion\script
OK, d:\unix\nextVersion\script is the correct windows version of the path, but it is in absolute form. I would prefer it if cygpath left it in relative form, i.e.
echo $mypath
should output
..\
Executing
cygpath --help
indicates that the only related option is -a, but that forces conversion to absolute paths, which is the opposite of what I want. It seems, unfortunately, as if cypath has -a on by default and has no way to turn it off!

Is this a known bug in cygpath, or did I overlook something? (Web searching on cygpath and "relative path" generated a flood of hits, but none out of the first 100 that i looked thru seemed related...)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
tar and relative paths BeefStu Shell Programming and Scripting 1 03-10-2011 04:41 AM
Print sum and relative value of the sum saint2006 Shell Programming and Scripting 2 07-08-2010 10:37 AM
Absolute and Relative Paths? stubie UNIX for Dummies Questions & Answers 1 10-05-2009 04:20 PM
relative pointers on Unix rahul_verma Programming 3 07-24-2005 12:36 AM
Relative directory - NOT absolute sierra_aar Shell Programming and Scripting 4 09-09-2002 05:11 AM



All times are GMT -4. The time now is 03:36 PM.