Thread: resolve pwd //
View Single Post
Old 06-02-2005, 03:14 PM  
Junior Member
Join Date: May 2005
Posts: 14

regsub what? {/} {//} {///} {/////}

bit infalted dont u think, and im sure if it wasnt useful, it wouldnt be part of unix. but, i guess you're bored.

heres an example:

mkd from site root, pwd is therefore: /
mkd /0day/1224/test
io args: MKD /0day/1224/test
glue em together //0day/1224/test

u can do:

set pwd /[string trim [string trim $pwd /]/[string trim [lrange $args 1 end] /] /]
but waste of time if hardcoded, just a req, not lifestyle decision, matey.
mentality is offline   Reply With Quote