I'm processing some file names here. I need to remove the ^0 from the end of every file in a specific directory. For example:
root/etc/data.1.2.3^0
root/etc/file.4.5.6^0
root/etc/fileA.7.8.9^0
I want to remove the root/etc/part and the weird ^0 part. So far I figured the following:
sed -e 's:root/etc/::' to remove the root/etc/part. Now I'm confused about how to remove the ^0 part.
I tried:sed -e 's:root/etc/^0$::' and sed -e 's:root/etc/\^0$::', but none of them is working.
I think I did not parse ^ as a character in sed correctly since ^ means something else in sed.