#!/bin/bash for disk in {0..75} do smartctl -t long /dev/da$disk done
for drive in `sysctl -n kern.disks`
Like I said, I figured there would be a command (or series of commands) to list the identifiers of all installed disks... One of these days I really need to learn a bit about awk...
Actually, do you really need the awk command? The sysctl command appears to list all the disks, and the order shouldn't matter to this application. You could probably simplify to
Code:for drive in `sysctl -n kern.disks`
...or am I missing something?
Like I said, I figured there would be a command (or series of commands) to list the identifiers of all installed disks... One of these days I really need to learn a bit about awk...
Actually, do you really need the awk command? The sysctl command appears to list all the disks, and the order shouldn't matter to this application. You could probably simplify to
Code:for drive in `sysctl -n kern.disks`
...or am I missing something?