LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-28-2008, 07:27 AM   #1
vikashtulsiyan
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
[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

Last edited by vikashtulsiyan; 08-28-2008 at 07:57 AM.
 
Old 08-28-2008, 07:35 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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?
 
Old 08-28-2008, 07:57 AM   #3
vikashtulsiyan
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Original Poster
Rep: Reputation: 0
i got it. Thanks
 
Old 08-29-2008, 08:00 PM   #4
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,234

Rep: Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545
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.

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"urgent" Can't Install Glusterfs "ubuntu 8." sjahed Linux - Newbie 1 07-02-2008 03:13 PM
Do you view uninformative thread subjects like "urgent", "please help", etc. bigrigdriver General 17 02-21-2008 02:08 AM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 12:24 PM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 03:48 AM
gnome global settings "Help Me!!" or "URGENT" Fascistchicken Linux - Software 3 01-26-2004 07:27 PM


All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration