Name="Shell-Skript-Debugging" Stich="Shell-Skript Skript Shell Debugging debug" Zeit="Son Sep 9 11:51:56 MEST 2001" Kurz="Dieser Artikel hilft, umfangreiche Shell-Skripte zu debuggen." Lang=" Das Skript, Download: `exCodes debug.sh` #!/bin/bash # debug.sh - Simple debug functions for shell scripts # Copyright (C) Son Sep 9 11:59:18 MEST 2001 by Ingo Blechschmidt # The script is from http://www.sourceforge.net/users/rstickley/. # # 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 # # function debug { echo -ne \"\\ndeb> \" read -e mOn while [ ! -z \"\$mOn\" ]; do eval \$mOn echo -ne \"\\ndeb> \" read -e mOn done } # Usage: # # First call '. debug.sh' in your script at the top. This enables the # debugging. Call at a place you want to debug the function debug. Then a debug # prompt is displayed. Use a simple <CR> to return. `exCodee` Die Benutzung ist einfach: `exCodes beispielskript.sh` #!/bin/bash . debug.sh [...] a=b debug [...] `exCodee` Das Ergebnis könnte dann zum Beispiel so aussehen: `exCodes Beispiel-Ausgabe` deb> echo \$a b deb> <CR> `exCodee` Happy Debugging!
" 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/0013.txt txt/0054.txt txt/0059.txt txt/0085.txt txt/0086.txt"