#!/bin/sh
##
# Questo script permette di eseguire un backup delle note scritte
# usando l'applet gnome chiamata Sticky-Notes, quella che crea
# note simili a post-it. Esempio di utilizzo di if ed else in bash
##
if env|grep BACKUP_NOTES; then
echo;
else
echo Esporto la variabile BACKUP_NOTES;
export BACKUP_NOTES=~/Documents/notes;
fi
if dir $BACKUP_NOTES/..|grep notes; then
echo
else
echo Creo la directory notes;mkdir $BACKUP_NOTES
fi
echo Sovrascrivo il file di backup
cp ~/.gnome2/stickynotes_applet $BACKUP_NOTES/notes.txt
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento