[Veritas-bu] drive script, help please
2005-01-05 13:54:43
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I am trying to write a script that will give an exit of 1 for anything
other then TL8, and am having some issues. The problem is that if one of
our drives were to show up as AVR, it wouldn't be assigned a numerical
value. For the output, all of the drives are TL8, execpt for drive 6,
which is TL8-DOWN.
Thanks,
Jason
Right now I have this.
#!/bin/bash
for i in `seq 0 7`
~ do
echo "drive $i has and exit of:" `vmoprcmd -d ds |tail +5 |awk
'{print $1, $3}' |grep -i $i |awk '{print $2}' |sed
's/DOWN-TL8/1/;s/TL8/0/;'`
done
It will output this:
drive 0 has and exit of: 0
drive 1 has and exit of: 0
drive 2 has and exit of: 0
drive 3 has and exit of: 0
drive 4 has and exit of: 0
drive 5 has and exit of: 0
drive 6 has and exit of: 1
drive 7 has and exit of: 0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFB3DfzE8NXcvhlySYRAhPnAJ9//YJgX4yANtLqOL6BZuiHXVXtIgCfcn1G
2+vpS3I8oHaC2o+X2Vl1jXE=
=gOK5
-----END PGP SIGNATURE-----
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Veritas-bu] drive script, help please,
Jason Helfman <=
|
|
|