I use Visual Studio for my C# development while using Cygwin for some of the tasks that require scripting. Recently I wanted to change all occurrences of string
BBB in my project's files. I started with old trusty
sed but, to my dismay, it changed DOS new line sequences to Unix ones.
Here's what I used:
sed -i 's/AAA/BBB/g' $(grep -rl AAA /cygdrive/c/project_path)
It seems there is no
sed switch that would do what I want. Is there some other Unix tool that could help me?
EDIT: In between C# files there are some other scripts that have Unix new line characters. It would be best if this tool didn't change them to DOS ones. :)