File: changehdr.sh

package info (click to toggle)
imview 1.1.9c-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,068 kB
  • ctags: 3,686
  • sloc: cpp: 28,834; sh: 2,624; ansic: 1,818; makefile: 767; exp: 112; python: 88
file content (15 lines) | stat: -rwxr-xr-x 425 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
	
mkdir /tmp/imview
mkdir /tmp/imview/io
mkdir /tmp/imview/server

for file in *.h *.c *.cxx *.hxx io/*.cxx io/*.hxx server/*.cxx server/*.hxx ; do
    tmpfile=/tmp/imview/$file
    sed -n -e '/^.*/p' -e '/^ \* \*\//q' $file > /tmp/imview/oldheader
    nblines=`wc -l /tmp/imview/oldheader | awk '{print $1}'`
    sed -e "1,$nblines d" $file > $tmpfile
    cat header.txt $tmpfile > $file
done

rm -rf /tmp/imview