SED numbered buffer,

Posted on 2006-05-31
Last Modified: 2012-05-05
How do I change the slash of the path into space?

should look like

/bin date
/bin/programs cal
/usr/bin date
/usr/report file1
/usr/report/letters lett1
/spool mails
Question by:d2marcelo
    LVL 7

    Expert Comment

    sed 's#/([^/]*)$# \1#'

    LVL 7

    Accepted Solution

    Oh, the shell will muck you up, so you have to escape the ( )

     sed 's#/\([^/]*\)$# \1#'

    Sorry about that

    If you want to read that, it says
    "Match a single / and group ( ) the rest up to the end of the line ($).  The text in the group
    must NOT "^" be a forward slash."
    "Replace with a single space and everything in group #1"
    LVL 7

    Expert Comment


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Report events not being triggered 8 71
    JQuery Date Time picker not showing 29 83
    Problem to setup 18 67
    changeXy challenge 13 42
    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    This is an explanation of a simple data model to help parse a JSON feed
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now