标签:linux shell
#!/bin/bash
set -x
PARTED=$(which parted)
if [ -z "$PARTED" ];then
apt-get install -y parted
fi
PARTED=$(which parted)
devices=$($PARTED -l 2>&1|grep Error|awk -F: ‘{print $2}‘|xargs)
part(){
FDISK=$(which fdisk)
for i in $*;do
$FDISK $i <<EOF
n
标签:linux shell
原文地址:http://132408.blog.51cto.com/122408/1895864