Bash String Functions Substring Php Character