-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 21 Dec 2002 12:36:31 +0200 [EMAIL PROTECTED] wrote:
[despre script] oops - --------------------------- #!/bin/bash #Copyright 2002 slymer@Undernet #This program is freesoftware; you can redistribute it and/or #modify it under the terms of theGNU General Public License as #published by the Free Software Foundation;either version 2, 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., 59 Temple Place - Suite 330, Boston, #MA 02111-1307, USA. if [ -z $1 ]; then echo usage: $0 "<source dir> [dest dir]" exit fi if [ -z $2 ]; then DT=$HOME/backupdir/ else DT=$HOME/$2 fi FN=backup-`date +%a-%b-%Y`.tar.bz2 CALE=$HOME/$1 echo "entering: "$CALE cd $CALE echo "putting files together and compressing them with bzip2" echo "filename will be: "$FN echo " " tar -cjvf $FN *.* echo "Done. Now moving file to the backup dir:" echo "--------------" cd if [ -a $DT ]; then echo "OK "$DT" exists!" cd $DT echo "Moving "$FN" to "$DT mv -v $CALE$FN $DT ls --color $DT exit else echo $DT" does not exist. I will create it..." mkdir $DT cd $DT echo "Moving "$FN" to "$DT mv -v $CALE$FN $DT ls --color $DT exit fi - ------------------------ - -- People tend to make rules for others and exceptions for themselves. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+BEcffNzWnG45UpcRAmo+AKCC8g5GSxVLMNgGM2WjwcZ6D0zL4QCffCjz awOzFwvgsfqEtQMF8K+OT8c= =H6Nr -----END PGP SIGNATURE----- --- Pentru dezabonare, trimiteti mail la [EMAIL PROTECTED] cu subiectul 'unsubscribe rlug'. REGULI, arhive si alte informatii: http://www.lug.ro/mlist/
