sed from a filed file list - Help

This is a discussion on sed from a filed file list - Help ; Hi I want to > sed ..... file1 file2 file3.... > another_file but I do not want to write file1 file2 file3, I want these file names to be listed in another file, FILE say. What I want to know ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: sed from a filed file list

  1. sed from a filed file list

    Hi

    I want to

    > sed ..... file1 file2 file3.... > another_file


    but I do not want to write file1 file2 file3, I want these file names
    to be listed in another file, FILE say. What I want to know is, how I
    can extract the file names from FILE and input them to sed, to obtain
    the result above, any suggestions?

    Thank you

    Douglas

  2. Re: sed from a filed file list

    On Tue, 01 Jun 2004 14:14:14 -0700 Douglas scrawled this disquisition:

    > Hi
    >
    > I want to
    >
    >> sed ..... file1 file2 file3.... > another_file

    >
    > but I do not want to write file1 file2 file3, I want these file names to
    > be listed in another file, FILE say. What I want to know is, how I can
    > extract the file names from FILE and input them to sed, to obtain the
    > result above, any suggestions?



    # Make your list of files in FILE one name per line i.e. dir -1 > FILE

    for X in $(cat FILE)
    do
    sed -e whatever $X >> another_file
    done



    FS


+ Reply to Thread