Hi, I am using vi. I need help with search and replace.
I have a file close to 100 lines. I want to search /var and replace with rm /var.
/var/sadm/pkg/SUNWcsu/save/125378-03/undo.Z
/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/save/127718-02/undo.Z
/var/sadm/pkg/SUNWcsr/save/127718-02/undo.Z
My results should look like this..
rm /var/sadm/pkg/SUNWcsu/save/125378-03/undo.Z
rm /var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/save/127718-02/undo.Z
rm /var/sadm/pkg/SUNWcsr/save/127718-02/undo.Z
Please help. I did :s didn't work. the rm word comes before /