Created
December 4, 2014 01:54
-
-
Save checko/2532242d43f507650b76 to your computer and use it in GitHub Desktop.
test, create partitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
create_partition() | |
{ | |
local part_type=$1 | |
local part_num=$2 | |
local part_size=$3 | |
echo -n "create_partition($part_type, $part_num, $part_size)..." | |
case $part_type in | |
p|e|l);; | |
*) | |
echo $part_type not supported!;; | |
esac | |
echo "n | |
$part_type | |
$part_num | |
$part_size | |
wq " | fdisk -c -u /dev/sdc | |
} | |
create_partition p 1 +32M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment