#!/bin/sh
today=`date -R`
find . -type f \( -name "*.h" -o -name "*.cpp" \) -print | \
xargs sed -i 's/{DATE}/'"$today"'"/g'
'"$today"'. The inside double quotes are needed to let shell expand $today to its value.
#!/bin/sh
today=`date -R`
find . -type f \( -name "*.h" -o -name "*.cpp" \) -print | \
xargs sed -i 's/{DATE}/'"$today"'"/g'
'"$today"'. The inside double quotes are needed to let shell expand $today to its value.
set ts=4
set shiftwidth=4
set expandtab
set nowrap
:mkvimrc
$ cp -R libfoo.orig/ libfoo.new/When you finished with modifications to libfoo.new/, generate GNU unified patch:
$ diff -rupN libfoo.orig/ libfoo.new/ > libfoo-05282012.patchTo generate a unified patch against the CVS:
$ cvs diff -u > libfoo-05282012.patchThe patch can be applied to the origianl source tree:
$ cd libfoo/ $ patch -p0 < libfoo-05282012.patchTo revert the patch:
$ patch -p0 -R < libfoo-05282012.patch