I have a file that conatins following info
Policy1=U|guestRoom=test1idCode=5(1):!:Amenity2=U|RoomId=testrma=4(1):!
GuestRoomAmenity1=U|guestRoomId=testguest1id^rmaCode=5(1):!
I need it to look like this
Policy1=U|guestRoom=test1idCode
Amenity2=U|RoomId=testrmaCode
GuestRoomAmenity1=U|guestRoomId=testguest1idrmaCode
Basically need to cut out "\([0-9]\):!:" and start the remaining on the next line.
I am trying to use following sed command
sed -e 's/([0-9]):!:/\n/g' $FILE > $TEMP_FILE && mv $TEMP_FILE $FILE
but I am not getting righ result.
What I am getting is
Policy1=U|guestRoom=test1idCode\nAmenity2=U|RoomId=testrmaCode...
So for some reason "\n" does not work.
Any ideas on what is wrong here?
Thank you in advance