Script per archiviazione cd-rom
Stefano T
s.tanfoglio a tiscalinet.it
Gio 10 Gen 2002 21:36:54 UTC
Ciao questo e' uno script che permette di realizzare
l'immagine del CD-ROM nella directory desiderata
in modo da poter cercare all'interno degli archi creati
i file desiderati senza ogni volta montare e rismontare
il cd-rom per vedere cosa contiene.
Se qualcuno e' interessato a riportare commenti o
modifiche mi scriva pure.
Ciao
ST
#!/bin/bash
#File per l'archiviazione di CD-ROM
# Controllo se il device cdrom e' montato.
DIR_ARC="/home/stefano/Archivio_cd/"
MOUNT=`mount -t iso9660`
if [ "$MOUNT" != "" ]
then
cd; umount /mnt/cdrom; eject
echo ""
echo "Prego inserire il CD-ROM da archiviare. Grazie"
echo ""
echo "Premere Enter."
read ENTER
if [ "$ENTER" = "" ]
then
mount /mnt/cdrom
echo ""
echo "Perfavore digitare il nome dell'archivio e premere ENTER. Grazie"
read ARCHIVIO
ls -1R /mnt/cdrom > $DIR_ARC/$ARCHIVIO
echo ""
echo "Perfavore digitare il nome dell'archivio e premere ENTER. Grazie"
read ARCHIVIO
ls -1R /mnt/cdrom > $DIR_ARC/$ARCHIVIO
echo ""
echo "Grazie. CD-ROM archiviato. Sotto il nome di $ARCHIVIO"
umount /mnt/cdrom; eject
else
echo "PERFAVORE PREMERE INVIO SENZA SCRIVERE NULLA! Grazie"
fi
else
# eject
echo ""
echo "Prego inserire il CD-ROM da archiviare. Grazie"
echo ""
echo "Premere Enter."
read ENTER
if [ "$ENTER" = "" ]
then
mount /mnt/cdrom
echo ""
echo "Perfavore digitare il nome dell'archivio e premere ENTER. Grazie"
read ARCHIVIO
ls -1R /mnt/cdrom > $DIR_ARC/$ARCHIVIO
echo ""
echo "Grazie. CD-ROM archiviato. Sotto il nome di $ARCHIVIO"
umount /mnt/cdrom; eject
else
echo "PERFAVORE PREMERE INVIO SENZA SCRIVERE NULLA! Grazie"
fi
fi
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
Maggiori informazioni sulla lista
Lug
|