Sorry for the vague subject but I think this will be straightforward for most.
I have a series of text files like this:
I want to delete everything between each at symbol (@) and the next colon (
so that the output looks like this:
I tried the following sed command:
sed 's/@.\+:/@/g' *.tre
But it deletes everything between the first at symbol and the last colon:
I guessed that I need to replace the final /g with another flag but I can't figure out what that would be (/1 doesn't work).
Any suggestions would be greatly appreciated!