SED numbered buffer,

How do I change the slash of the path into space?
/bin/date
/bin/programs/cal
/usr/bin/date
/usr/report/file1
/usr/report/letters/lett1
/spool/mails

should look like

/bin date
/bin/programs cal
/usr/bin date
/usr/report file1
/usr/report/letters lett1
/spool mails
d2marceloAsked:
Who is Participating?
 
wnrossConnect With a Mentor Commented:
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"
0
 
wnrossCommented:
sed 's#/([^/]*)$# \1#'

Cheers
-Bill
0
 
wnrossCommented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.