Using output to input another command

Hi guys. Is it possible (I'm sure it is) to use the output of a simple 'ls' command as input of another command 'tail'.
It is not really the output of the 'ls'. I have to useeach line of the output.

This is the first command...
ls *myFile*021308*

Which it outputs many filenames. For each of those filenames I want to tail them

tail 1.myFlie_021308
tail 2.myFlie_021308

Thanks
Rodrigo

#! /bin/bash

for zf in *myfile*.*
do
ls -l $zf
tail $zf
done

Notes:
(1) I do an ls command; not needed - just shows what file is being looked at in the loop
(2) tail is its own command line since guess you want to do more than simply execute this one command

This could all be done in one line as:
tail *myfile*.*
but, I figure this is part of something more complicated.
So, two choices.

Here's another one if you kind of like the output/input style :slight_smile:

ls | xargs -n1 tail

Thank you both. It was easier than I thought!

Rodrigo