I must write a script to change all C++ like comments:
// this is a comment
to this one
/* this is a comment */
How to do it by sed? With file:
#include <cstdio>
using namespace std; //one
// two
int main() {
printf("Example"); // three
}//four
the result should be:
#include <cstdio>
using namespace std; /*one*/
/* two*/
int main() {
printf("Example"); /* three*/
}/*four*/
I don't know how to append */ on the end of line. Can anyone help me?
Best regards,
Lucas