craken
craken

Reputation: 1411

Linux Shell script parse many file line by line

I want to parse many file line by line in linux but i can't do it like this

while read p; do
    //do something
done <file1,file2,file3

But this code display file1,file2,file3 : No such file or directory

Upvotes: 1

Views: 51

Answers (1)

Michael
Michael

Reputation: 3729

cat file1 file2 file3 | while read p
do
    //do something
done

Upvotes: 1

Related Questions