#!/bin/bash
s='root/etc/data.1.2.3^0
root/etc/file.4.5.6^0
root/etc/fileA.7.8.9^0'
sed 's:root/etc/\(.*\)\^0$:\1:' <<< "$s"