--------------------------------Linux Guide---------------------------------- by Ingo Blechschmidt (c) 2002 ----------------------------------------------------------------------------- ------------------------- Artikelsuche ------------------------- Die Jun 19 16:36:00 MEST 2001 ------------------------- Artikel Suchen Index Stichwortliste grep ----------------------------------------------------------------------------- "In welcher Zeitschrift war der Artikel über die Bash nochmal?" Diese Frage begegnet Ihnen mit diesem Skript nicht mehr. ----------------------------------------------------------------------------- Folgendes Shell-Skript schafft Abhilfe: --------CODE--------: artikelsuche.sh #!/bin/bash # artikelsuche.sh - Ermöglich die Suche nach zuvor eingetippten Sichworten # (c) by Ingo Blechschmidt, # Die Jun 19 16:38:25 MEST 2001 # # 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 # # if [ "$1" = "--new" ]; then read -p "Geben Sie den Namen und Ausgabe der Zeitschrift an, gefolgt von einem Trennstrich und den Stichwörtern: " echo $REPLY >> ~/.artikelsuche.lst elif [ "$*" ]; then grep "$*" ~/.artikelsuche.lst else echo "$0: Syntax: $0 regexp $0 --new" fi --------/CODE-------- Wird das Skript mit dem Parameter --new aufgerufen, erwartet es eine Eingabe in der Form LinuxUser 5/2001 - Spiele Tribes 2 Rune Translate Übersetzen. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This document is distributed under the terms of the GNU Free Documentation License.