Hi,

--- On Fri, Nov 28, 2014 at 11:58 AM, Baskar Selvaraj
<bas...@linuxpert.in> wrote:
| I need to extract the last two directory names using sed.  Any
| help/pointers would be appreciated
\--

Use awk:

  $ echo "/pub/videos/nptel/Computer Science and Engineering/Data Structures And
Algorithms" | awk '{print $(NF - 1), $NF}' FS='/' OFS='/'

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to