First sample, the most basic use, find a string and replace it.
I can used to to access my bash script.
# at the end of the file
# add comments
# author mark.chen \
# date 2007 \
and my script
Second, "dos2unix.sed". It may not perfect, I am still learning sed, but I used it remove "^M" or 0x0d from code. The use is "dos2unix.sed a.c > a_2.c", if the output is the same as the input, it may not work, so make sure the output is different
#! /bin/sed -f