I have a bunch of c files and I want to change the first line that appears as
//something
into
/*something
Using sed, you can use the command ‘s/old_pattern/new_pattern/g’ where -e stands for edition, and -i to apply the changes. If you just want to see what would be the outcome, do not use the -i option.
sed -i -e 's/\/\/$Id/\/*$Id/g' *.c
0 comments:
Post a Comment