change possbile bashism to obtain the first character of a string