![]() |
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| extract a part of a path like (input: /etc/exp/home/bin ====> output: exp) | yeclota | UNIX for Dummies Questions & Answers | 4 | 12-16-2008 05:37 AM |
| retrieve value from a file | satish@123 | Shell Programming and Scripting | 1 | 05-17-2008 08:40 AM |
| display full unix path as part of the command line | ocelot | UNIX for Dummies Questions & Answers | 3 | 10-10-2006 03:58 PM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 12:47 PM |
| getting the path part of an argument | ropers | Shell Programming and Scripting | 9 | 03-24-2004 02:39 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
retrieve part of file path
Hi
I am trying to use sed to retrieve part of my html file's path. I am having a hard time getting what I want. Could someone give me some help? I want to retrieve the section after html and before the file name For example if I have the following, /home/folder1/html/home/house/Home.html@@/main/ What do I need to do to get home/house I have tried Code:
echo /home/folder1/html/home/house/Home.html@@/main/ | sed 's/.*\/html\/\*.*\.html\).*\/1/' Any help will be greatly appreciated Last edited by Franklin52; 03-23-2009 at 04:24 AM.. Reason: adding code tags |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|