Example number:
01101000
-> 0110 | 1000
Result:
1000 | 0110
final result :
10000110
Example number:
01101000
-> 0110 | 1000
Result:
1000 | 0110
final result :
10000110
You can try:
a="01101000"
echo "${a:0:4} | ${a:4:8}"
For final result:
echo "${a:4:8}${a:0:4}"
Hope it's helpful to you.