#!/bin/bash
 

declare -a uuid
declare -a label
declare -a device
declare -a type

dir=/media

let count=0


let count=0
for f in `sudo blkid -s UUID -o value`; do
	uuid[$count]=$f
	let "count++"
done

let count=0

for f in `sudo blkid -s LABEL -o value`; do
	label[$count]=$f
	let "count++"
done
let count=0

for f in `sudo blkid -o device`; do
	device[$count]=$f
	let "count++"
done



let count=0
for f in `sudo blkid -s TYPE -o value`; do
	type[$count]=$f
	let "count++"
done


#echo number of elements:${#ARRAY[@]}

size=${#label[@]}
let count=0
while [ $count -lt $size ]; do
echo \#${device[$count]}=$dir/${label[$count]} 
echo  UUID=${uuid[$count]}	$dir/${label[$count]}	${type[$count]} 	defaults	0	0
let "count++"
done>myvalue.txt


let count=0
while [ $count -lt $size ]; do
	sudo mkdir $dir/${label[$count]}
	let "count++"
done


