Name="Seiten zählen und drucken"
Stich="Seiten Seite zählen links w3m lynx pr ^L find pages page Page
Pages seite Text Formate formate drucken Drucken Drucker"
Zeit="Mon Oct 22 13:59:02 MEST 2001"
Kurz="Sie wollen von vielen Dokumenten die Seitenanzahl wissen. Mit pr geht
dies sehr schnell."
Lang="
Das folgende Skript erwartet einen Verzeichnisnamen (. für das aktuelle
Verzeichnis) und eine Überschrift als Parameter und gibt alle Dateien,
schön für den Ausdruck formatiert, auf STDIN aus. Nebenbei zeigt es
oben rechts die Seitennummer an. Das Skript unterstützt bis jetzt nur
Nur-Text (mittels cat) und HTML (mittels w3m oder links), aber es lässt
sich sehr gut erweitern.
Das Skript, Download:
`exCodes prdocs.sh`
#!/bin/bash
# prdocs - Displays all files in the directory given by the first parameter in
# a printer-nice form. It supports up to now only the Text- and
# HTML-Format.
# Copyright (C) Mon Okt 22 14:05:40 MEST 2001 - now by Ingo Blechschmidt,
# released under the Terms of the GNU General Public License.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Ingo Blechschmidt
# Arberstraße 5
# 86179 Augsburg
# E-Mail: iblech@web.de, http://www.way.to/uselinux/
# Tel.: +49 / 821 882955
#
#
{
for i in \`find . -print\`; do
case \$i in
*\.txt|INSTALL|README|READ.ME|LIESMICH) cat \$i ;;
*\.html|*\.htm) w3m -dump \$i ;;
echo "" # next page
done
} | pr -h \$2
`exCodee`
"
case $1 in
Name) echo $Name; exit;;
Stich) echo $Stich; exit;;
Zeit) echo $Zeit; exit;;
Kurz) echo $Kurz; exit;;
Lang) echo $Lang; exit;;
esac
# if [ "$1" = "Name" ]; then echo $Name; fi
mself_vA="txt/0012.txt txt/0024.txt txt/0037.txt
txt/0050.txt txt/0054.txt txt/0058.txt txt/0059.txt txt/0061.txt
txt/0063.txt txt/0065.txt txt/0066.txt txt/0068.txt txt/0084.txt txt/0085.txt"