You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
392 B
12 lines
392 B
5 years ago
|
#!/bin/sh
|
||
|
|
||
|
MKSED=false
|
||
|
OUTPUT="$(ls -l --color=never /sys/block | grep -v virtual | grep devices | cut -d\ -f9- | sed 's/\.\.\/devices\/pci//g;s/[0-9]\{4\}:[0-9]\{2\}[0-9:.a-f]*//g;s/\/\/\/*//g;s/->/=/g' | cut -d/ -f1)"
|
||
|
|
||
|
case "${1}" in
|
||
|
--sed) sed "$(echo ""${OUTPUT}"" | sed 's/ = / (/g;s/\(sd.\)/s\/\1 \\{7\\}\/\1/g;s/ s\//)\/g;s\//g'))/g" /dev/stdin ;;
|
||
|
*) echo "${OUTPUT}" ;;
|
||
|
esac
|
||
|
|
||
|
|