首页 > 代码库 > linux shell 学习

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 学习