#!/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