#!/usr/bin/bash
#
# Usage: scandrives.sh drive [drive, drive, ...]
#
# e.g. scandrives.sh 0cbn 1cbn 2cbn
#
# This would scan /dev/rmt/0cbn /dev/rmt/1cbn and /dev/rmt/2cbn
#
if [ $# -lt 1 ]; then echo "Usage: $0 drive [drive, drive, ...]"; exit 1 ; fi
DRIVES=$*
echo "NB: You are about to start a \"scanner -n\" on the following drives:"
for d in $DRIVES ; do
echo /dev/rmt/${d} output written to ${d}.scan
done
echo -n "Proceed? (Y/N): "
read answer
if [ X$answer != "XY" ]; then exit 1 ; fi
# We proceed from here ...
for d in $DRIVES ; do
echo "nohup scanner -vvv -n /dev/rmt/${d} >${d}.scan 2>&1"
nohup scanner -vvv -n /dev/rmt/${d} >${d}.scan 2>&1 &
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.