I use ciscocmd to get the "show int" output into FILE and then run
egrep -A 20 "is down," FILE | egrep "is down|Last input" |
egrep -B 1 never | grep -v never |
awk '{print "int " $1 "\v shut" }' > FILE.cmd
this products a file of
int GigabitEthernet1/1
shut
int GigabitEthernet1/2
shut
int GigabitEthernet1/7
shut
int GigabitEthernet1/12
shut
and I can then push it back