Advertisement
jdefelice

lsas.sh

Apr 21st, 2012
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/sh
  2. (sas2ircu 0 display | sed -e '/^---.*/d' -e '/^Enclosure information/,$ {d;}' -e '/^Device is a/,/^$/ { s/^[^:]*: \([^ ]*\).*$/\1,/g; }' -e 's@^,$@N/A,@g' -e '/^LSI Corporation SAS2 IR Configuration Utility/,/^Physical device information/ {d;}' -e 's/^Device is a \(.*\)$/\1,/g' -e 's/^$/q1w2e3r4/g' | tr '\n' ' ' && echo) | sed -e 's/ q1w2e3r4 /\
  3. /g' | sed -e 's/^Enclosure services device/ESD/g' -e 's/^Hard disk/HDD/g' -e 's/, /,/g' -e 's/,$//g'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement