use shell array and loop saving lines of codes