How can I make my script simple?

view story

http://www.unix.com – Hi .. I am trying to print first row few columns and last row few column... I am doing like this... I want to do using single awk Code: for file in *.xyz; do dt_end=$(awk 'END{print $2 "\t" $3 "\t" $4}' FS="," $file) dt_start=$(awk 'FNR == 1{print $1 " \t"$2 }' FS="," $file ) echo $dt_start $dt_end done (HowTos)