[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [off-topic] Best way to replace quotes with angle brackets



>> "OO" == Ossama Othman <othman@astrosun.tn.cornell.edu> writes:

OO> Cool!  However, I have several "types" of includes, e.g.:
OO> #include "duh.h"
OO> # include "duh.h"
OO> #include /**/ "duh.h"
OO> # include /**/ "duh.h"
OO> #  include ... etc.

OO> As such, I'd like to be able to do something like:

OO> #include "duh.h"	->	#include <duh.h>
OO> # include /**/ "duh.h"	->	# include /**/ <duh.h>
OO> ... etc.

find . -name "*.c" |xargs perl -pi.bak -e's/(#include[^"]+)"(.*?)"/$1<$2>/'

Should do it.

Ciao,
	Martin


Reply to: