Sometimes we need to search for very long key on the system, then split it into human readable chunks.To do so we can use 'grep' command in Linux, it is very easy to do.Example:
array=( $(echo b5f1e7bfc2439c621353d1ce0629fb8b | grep -o '[a-f0-9]\{8\}') )
The result is :
$ echo ${array[@]}
b5f1e7bf c2439c62 1353d1ce 0629fb8b
Comments
Post a Comment