function hddl () { if [ "${1:0:2}" == "-h" ]||[ "${1:0:2}" == "-?" ] then echo -e "\033[0;32mReinis ${FUNCNAME[0]} V1.0\033[0m" echo "Reinis .bashrc Tools" echo "" echo "Zeigt den Speicherplatz der HDDs von IP-Adresse" echo "" echo "IP-Adresse default ist localhost" echo "" return fi if echo $1 |egrep '.*\..*\..*\..*' >/dev/null 2>&1 then remote=$(echo "ssh $1") else remote=$(echo "") fi if [ "$remote" == "" ] then remot=$(echo "localhost") else remot=$(echo "$remote") fi $remote cat /proc/partitions|grep -v major|grep "\S"|while read a do echo $(echo $a|awk '{print $4}';bytestohuman $(echo $a|awk '{OFMT="%.0f";print $3 *1024}')) done }