![]() |
|
|
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 string after a pattern using sed | gunaah | Shell Programming and Scripting | 1 | 10-11-2008 04:19 PM |
| Extract the Pattern | aajan | UNIX for Dummies Questions & Answers | 6 | 08-08-2007 05:47 AM |
| How to select lines in unix matches a pattern at a particular position | cs_banda | UNIX for Dummies Questions & Answers | 2 | 10-06-2006 04:28 PM |
| Please help! Sed extract a pattern | zhen | Shell Programming and Scripting | 11 | 09-18-2006 01:36 PM |
| select datas from an input file | dde | Shell Programming and Scripting | 1 | 05-21-2002 12:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hey, examples of the input (text line): /bla/blMOasdn234.adanif24/blabla.rar /bla/blMOasdn234.adanif24/blabla23124.bin /bla/bla/bla/bla/bla/bla.bin and what I need to do is extract/select only the dir path so the output would be: /bla/blMOasdn234.adanif24/ /bla/blMOasdn234.adanif24/ /bla/bla/bla/bla/bla/ I was trying to use sed and I could only get the oposite result, like Code:
echo /test/test2/test3/noname.rar | sed 's/\/.*\///' result noname.rar :/ Last edited by TehOne; 10-14-2008 at 02:25 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|