| What comes to mind is something like this:
#!/bin/sh
#
scu -f $1 <<EOF
format $2 $3
quit
EOF
So if this were called "foo" you could invoke it as:
# ./foo /dev/rrz1c defects all
In writing such a script you will no doubt want to add some error
checking, like the number of parameters passed, etc. Obviously
the above is just a tiny example; you will do something a bit more
complicated. At the risk of sounding pedantic, a script that
invokes scu with a "format" command is basically a loaded gun waiting
to go off. Please leave the script in a safe place...
Two things you should know about scu: one is that you can't do a
"set nexus" followed by a "format unit". scu specifically disallows
this. scu will also disallow (for obvious reasons) formatting a disk
if any of its partitions are currently mounted.
-- Farrell
[Posted by WWW Notes gateway]
|