Assumindo o bash:
function remove_copyright {
printf "%s\n" 1,10d w q | ed "$1"
}
function add_copyright {
if [[ $1 == Makefile ]]; then
ed "$1" <<END
0i
# ---------------------------------------------------------------------
# Copyright © 2014 Author Name
#
# All rights reserved
# ---------------------------------------------------------------------
.
w
q
END
else
ed "$1" <<END
0i
/*---------------------------------------------------------------------
Copyright © 2014 Author Name
All rights reserved
---------------------------------------------------------------------*/
.
w
q
END
fi
}
shopt -s nullglob globstar
for file in **/*.[ch]; do
if grep -q '^# Copyright \(C\)' "$file"; then
remove_copyright "$file"
fi
add_copyright "$file"
done