1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash OUTPUT=$1 shift echo TESTLIST > $OUTPUT if [[ $# -gt 0 ]] ; then echo -n $1 >> $OUTPUT shift fi while [[ $# -gt 0 ]] ; do echo -n " $1" >> $OUTPUT shift done echo -e "\nEND TESTLIST" >> $OUTPUT