im running below code on windows git bash .
createDirectory() { if [[ -d $1 ]] then cd $1 else mkdir -p $1 fi } createDirectory "process1"