Hello.
I am new to unix.
Using ksh.
I have this file in which I like to replace "CarRet" by a real carriage return ( or end of line or what ever it is).
ex :
Message1CarRetMessage2
should be
Message1
Message2
I tried a few things like :
sed 's\CarRet\/n\g' result : Message1/nMessage2
or 's/CarRet/'"$(printf '\015')"'/g' (not sure 15 is the correct number, but it didn't work anyways) result : Message1"$(printf '\015')"Message2
I tried sed 's/CarRet/\015/g'
error message : I know the reason is the way I wrote \015 but i do not know how to write it : I "use" 1 charcter for each digit, instead of having 1 character for the whole number - not sure how to explain this ...
Well, any idea is welcome !
I am new to unix.
Using ksh.
I have this file in which I like to replace "CarRet" by a real carriage return ( or end of line or what ever it is).
ex :
Message1CarRetMessage2
should be
Message1
Message2
I tried a few things like :
sed 's\CarRet\/n\g' result : Message1/nMessage2
or 's/CarRet/'"$(printf '\015')"'/g' (not sure 15 is the correct number, but it didn't work anyways) result : Message1"$(printf '\015')"Message2
I tried sed 's/CarRet/\015/g'
error message : I know the reason is the way I wrote \015 but i do not know how to write it : I "use" 1 charcter for each digit, instead of having 1 character for the whole number - not sure how to explain this ...
Well, any idea is welcome !