Question : merge, past, and parse text files

i want to merge first row from file1, file2, file3, .. fileM into new_file
then copy this first row from
then past it into row1,row2,.. rowN

also how can i call vi within my script to perform some tasks i.e replacing characters,past, delete,... etc
please advise
thank you

Answer : merge, past, and parse text files

you don't need sed for that, try

#!/usr/bin/bash
line=`head -1 assembled fie_new`
c=1
while test $c -le 10
do
    echo $line >> an_other_file
    c=`expr $c + 1`
done

or

#!/usr/bin/bash
line=`head -1 assembled fie_new`
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
echo $line >> an_other_file
Random Solutions  
 
programming4us programming4us