map and thread
regex shell script