Bash Implementation