bash script for extract data