data preprocessing with bash