#!/bin/bash
set -x
#trap read debug

Path="/Test/gary/run/something"
IFS=/
read -ra Array <<< $Path


for i  in "${!Array[@]}"
do

	A="${i} ; ${Array[i]}" #Load A
	echo "A is equal to $A"

	if test A="0 ;  " 
	then
		printf "continuing"
		continue
	else
		echo "Do rest of loop"
	fi

	#if   test -d "$i" ; then
	#	 echo "$1 Exists"
	#	cd $i
	#else
	#        mkdir  -p "$i"
	#	cd $i
	#	chown backup $i
	#	chmod -x $i
	#fi

done



#
#
#Parsed="${Path////$'\n'}"
#echo "Parsed="$Parsed
#
#echo "Next"
#
#No="`grep -o "/" <<< $Path | wc -l`"
#echo $No
#
#echo "Next"
#
#
##echo { sed 's/[^/]//g' $Path }
#
#
#
#
#function install_d {
#        Path=${1%/*}
#        echo $Path
#        Directory=${1##*/}
#if   test -d "$Directory" ; then
#        echo "$1 Exists"
#else
#        mkdir  -p "$Directory"
#        echo "$1 Created"
#fi
#        echo $Directory
#        cd $Path
#        pwd
#
#if   test -d "$Directory" ; then
#        echo "$1 Exists"
#else
#        mkdir  -p "$Directory"
#        echo "$1 Created"
#fi
#}
#0

