-   Programming (
-   -   [URGENT]how to remove "../.." from a path (

vikashtulsiyan 08-28-2008 06:27 AM

[URGENT]how to remove "../.." from a path
my path may contain ../../tmp/abc/xyz
HOw do i remove the leading ../..
So if the input is
../../aaa/bbb output should be /aaa/bbb
if input is
/var/gggg output should be /var/ggg

pixellany 08-28-2008 06:35 AM

Why is this urgent?? Please be aware that this keeps some people from responding.

Where is the path statement that you want to change? If it is in a text document, then you can just open it with an editor.

Were you maybe referring to the PATH environment variable?

vikashtulsiyan 08-28-2008 06:57 AM

i got it. Thanks

jlinkels 08-29-2008 07:00 PM

Second mistake.

You found out yourself, and you want to brag about it, but you don't care to tell the forum what you found and how you solved your problem.

That is considered extremely bad etiquette.


All times are GMT -5. The time now is 02:04 AM.