Hi If your file has only 2 columns and there is no space exists in 2nd column then you can use this script #!/bin/sh FILE="list.txt" OUTPUT="out.txt" while read VAL do VAL1=$(echo $VAL | awk '{print $1}' ) VAL2=$(echo $VAL | awk '{print $2}' ) echo "DEAR: $VAL1" >> $OUPUT echo "DEAR: $VAL2" >> $OUPUT echo " ">> $OUTPUT done<$FILE if you have spaces in between your 2nd column you might have to format the file using awk/sed so that there would be a valid delimeter between column1 and column2 column 1| column2 here we can use '|' as the delimeter and change awk statement to awk -F '| ' '{print $1}' or something like this. -- Regards, Mohan. chloe K wrote:
|
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos