Remove p it prints the replacement as well, hence you got it doubled
sed 's/pattern/PATTERN/g' file_to_read > file_to_write_to
P.S. The reason behind it if p is used on standard output it will print the replaced pattern to standard output, in your case you redirect standard output to a file, so here you got it printed to a file as well.
Last edited by neo77777; 10-17-2002 at 08:06 PM.
|