using bash for line copying