Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How delete characters of specific line with sed

$
0
0
Hi,

I have a text file with some lines like this:

Code:

/MEDIA/DISK1/23568742.MOV
/MEDIA/DISK1/87456321.AVI
/MEDIA/DISK2/PART1/45753131.AVI
/IMPORT/44452.WAV
...

I want to remove the last 12 characters in each line that it ends "AVI". Should look like this:


Code:

/MEDIA/DISK1/23568742.MOV
/MEDIA/DISK1/
/MEDIA/DISK2/PART1/
/IMPORT/44452.WAV
...

Does anyone know how to do it with sed?

Thank you,

Iñaki


Moderator's Comments:
Please use code tags next time for your code and data.

Viewing all articles
Browse latest Browse all 16232

Trending Articles