to remove comments (start with
/* comment */) in
settings.php, below command is just works fine:
sed '/^\#/d' settings.php > outp.txt mv outp.txt settings.php sed '/\/\*/,/*\//d; /^\/\//d; /^$/d;' settings.php > outp2.txt mv outp2.txt settings.php sed '/^$/d' settings.php > outp3.txt mv outp3.txt settings.php
But how to remove comments in all files including in subdirectories?