diff options
author | simulation <simulation@nlo-ext3.ioq.uni-jena.de> | 2016-02-09 09:54:46 +0100 |
---|---|---|
committer | simulation <simulation@nlo-ext3.ioq.uni-jena.de> | 2016-02-09 09:54:46 +0100 |
commit | 6be0f285adb27f60f058c2937a7885899e17cb88 (patch) | |
tree | be50a15314fe28c5b7b8f721233a34e71ca5b3b4 /postpost/del_headings | |
download | lpic-6be0f285adb27f60f058c2937a7885899e17cb88.tar.xz |
Diffstat (limited to 'postpost/del_headings')
-rwxr-xr-x | postpost/del_headings | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/postpost/del_headings b/postpost/del_headings new file mode 100755 index 0000000..0dc4182 --- /dev/null +++ b/postpost/del_headings @@ -0,0 +1,33 @@ +#!/bin/sh + +for t in $1* +do + if [ -e $t ] + then + for u in $t"/Post/*_noheadings" + do + if [ -e $u ] + then + rm $u; + fi + done + fi +done + +for t in $1* +do + if [ -e $t ] + then + for s in $t/Post/ft-* + do + if [ -e $s ] + then + echo $s; + u=$(grep -c . $s); + u=$[$u-1]; + tail -n$u $s > $s"_noheadings"; + fi + done + fi +done + |