using bash scripts to retrieve files