I need to remove the first two characters of every line in a file ( always the same ) and the last "/" if it is present.
Input is, in the file F1 :
^./inst/oracle/ ^./tmp/ ^./inst/maj/ ^./mkcd ^./var/adm/ras/livedump/
cat F1 | sed 's#^\^\.\(.*\)/$#\1#'
I get the following result :
/inst/oracle /tmp /inst/maj ^./mkcd ^./var/adm/ras/livedump/
Same result with a "g" at the end of the sed
The last lines are ignored. I can't figure out why it is doing the job for the first 3 lines and then stopping.