string help

I have a value in $val

val will be having like 00011 or 11010 etc

i need to get first charector, second charector in defferent variable.

Please help

Use cut. The '-c' option is exactly what you want.