Article 5AS40 Text Manipulation

Text Manipulation

by
GPGAgent
from LinuxQuestions.org on (#5AS40)
Hi,

I have this file with a few hundred lines like this:Code:https://jk.org/Volume1/Books_1_chapter_2
https://jk.org/Volume1/Books_1_chapter_3
https://jk.org/Volume1/Books_1_chapter_four
https://jk.org/Volume1/Books_1_section_2and i want to do this with simple script:Code:https://jk.org/Volume1/Books_1_chapter_2/Books_1_chapter_2.mp3
https://jk.org/Volume1/Books_1_chapter_3/Books_1_chapter_3.mp3
https://jk.org/Volume1/Books_1_chapter_four/Books_1_chapter_four.mp3
https://jk.org/Volume1/Books_1_section_2/Books_1_section_2.mp3basically take the text after the last / and adding it to the same line and appending .mp3 to it.

I know how to do a bit of simpler string manipulation but not this one.

Any tips welcome

Cheers folkslatest?d=yIl2AUoC8zA latest?i=w85lvMp_s64:l0U8RNnx5W0:F7zBnMy latest?i=w85lvMp_s64:l0U8RNnx5W0:V_sGLiP latest?d=qj6IDK7rITs latest?i=w85lvMp_s64:l0U8RNnx5W0:gIN9vFww85lvMp_s64
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments