0

I'm writing a script and I need to remove parts of a filename.

I need to remove everything between REMUX and the last - in the line

I have:

Movie/TV-Show S01 1080p BluRay REMUX VC-1 DD+ 5.1 -RlsGroup 
sed -E -i 's/REMUX.*\-//' $file 

gives me:

Movie/TV-Show S01 1080p BluRay RlsGroup 

but I want to keep the "REMUX" and the last "-"

Movie/TV-Show S01 1080p BluRay REMUX -RlsGroup 

can someone help me out with this?

1 Answer 1

2

Just:

sed -i -e 's/REMUX.*-/REMUX -/' -- "$file" 
2

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.