This is what I got so far:
--------------------------------------------------
BEGIN{
}
/9940B_[0-9]/{
# print $1 " has been mounted for " $2 " minutes.\n"
if(length($2)>=1500)
{
print $1 " ......Cleaning!\n"
print $1 | tpclean ???????
}
}
-----------------------------------------------
I run a script that prints out an output something like this:
Name Mount Time Last Cleaned
-------------------------------------------
9940B_1 1700 No comments
9940B_2 1300
9940B_3 1501
.
.
I want to be able to search for all the drives that have over 1500 hours of mount time and then be able to issue a shell command to clean those drives.. so say 9840B_1 has over 1500 hours of mount time I would then want to issue a shell command similiar to this:
$./tpclean 9840B_1
...and do the same to each drive that has over 1500 hours of mount time.
--------------------------------------------------
BEGIN{
}
/9940B_[0-9]/{
# print $1 " has been mounted for " $2 " minutes.\n"
if(length($2)>=1500)
{
print $1 " ......Cleaning!\n"
print $1 | tpclean ???????
}
}
-----------------------------------------------
I run a script that prints out an output something like this:
Name Mount Time Last Cleaned
-------------------------------------------
9940B_1 1700 No comments
9940B_2 1300
9940B_3 1501
.
.
I want to be able to search for all the drives that have over 1500 hours of mount time and then be able to issue a shell command to clean those drives.. so say 9840B_1 has over 1500 hours of mount time I would then want to issue a shell command similiar to this:
$./tpclean 9840B_1
...and do the same to each drive that has over 1500 hours of mount time.