--------------------------------Linux Guide---------------------------------- by Ingo Blechschmidt (c) 2002 ----------------------------------------------------------------------------- ------------------------- Übersicht über CD-ROMs ------------------------- Son Jul 8 09:37:36 MEST 2001 ------------------------- CD-ROM CD-R CD-RW Übersicht find gzip ----------------------------------------------------------------------------- Sie haben viele CDs, und wissen nicht so schnell, auf welcher CD welches Programm/Skript/Quelltext liegt. Abhilfe schafft dieses Skript. ----------------------------------------------------------------------------- Das Skript, siehe <"down/cdindex.sh">Download: --------CODE--------: cdindex.sh #!/bin/bash # cdindex.sh - Generiert einen CD-Index und erlaubt das Suchen in ihm # Copyright (C) Son Jul 8 09:37:36 MEST 2001 by Ingo Blechschmidt # # 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 # # [ "$1" ] || echo "$0: Usage: cdindex.sh [--neu|Dateiname]" if [ "$1" = "--neu" ]; then # Mountpoint geg. anpassen! MNTPNT="/cdrom/" # Zu indizierende Dateien IND='*' read -p "Name der CD: " NAME echo "Indiziere $NAME ($MNTPNT)..." find $MNTPNT \( -name "$IND" \) -print >> /tmp/cdindex.tmp gawk "{ print \"$NAME -- \" \$0; }" /tmp/cdindex.tmp > /tmp/cdindex2.tmp gzip -d ~/.cdindex.ind.gz cat /tmp/cdindex2.tmp >> ~/.cdindex.ind gzip -9 ~/.cdindex.ind rm /tmp/cdindex* else gzip -dc ~/.cdindex.ind.gz | grep -i $* fi --------/CODE-------- Mit dem Parameter --neu indiziert das Skript eine gemountete CD. Sonst funktioniert das Tool so: cdindex.sh SelfHTML sucht mit Hilfe von grep in der (mit gzip gezippten) Datenbank ~/.cdindex.ind.gz den Namen der CD auf der der Dateiname SelfHTML vorkommt. siehe <"down/cdindex.ind.gz">Hier lässt sich ein großer Index herunterladen. Wenn Sie wollen, schicken Sie mir doch Ihren Index zu, dann hat diese Site in ein paar Wochen (oder Jahren?) den größten CD-Index! ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This document is distributed under the terms of the GNU Free Documentation License.