delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

26 Jun 2004

Useful sed(1) regular expressions

Source code cleanup:

sed -i '' -E s/\ \	/\	/g *.c *.h
sed -i '' -E s/^\ \ \ \ \ \ \ \ /\	/g *.c *.h
sed -i '' -E s/\	\ \ \ \ \ \ \ \ /\	\	/g *.c *.h
sed -i '' -E s/\ +\$//g *.c *.h

Subsistitue / with \/:

sed -i '' -E s/\\\//\\\\\\\\\\\\\\\//g

Just joking… No, nobody will ever try to use the above command :-)