I'd like to process the output of a compile done in linux, and convert all error references to use dos file paths which can be parsed by a windows IDE. So, for example if I had the following line in the unix file:
linuxroot/a/b/c/file.c:200:1: error: evil use of / character
I'd like it to output:
d:\sftp\a\b\c\file.c:200:1: error: evil use of / character
So basically, I want to find anything that matches: ^\(linuxroot/[A-Za-z0-9_/.-]*\):[0-9]*:[0-9]*: error: \(.*\)$, and then run only the first group through another sed replacement:
sed -e "s|\/|\\\\|g" -e "s|^\\\\linuxroot|d:\\\\sftp". Is there any mechanism in sed to do something like this?