As previously noted, "tail -n 1 myfiles*" works. If you still want a Bash command line, here are a couple of options. The benefit of the first one is that tail does not print the names of the files.
$ for f in myfiles*; do tail -1 $f; done $ find myfiles* | xargs tail -n 1 # but this is totally like tail -n 1 myfiles* On Sun, May 5, 2024 at 8:00 AM American Citizen <website.read...@gmail.com> wrote: > Hi: > > Does anyone know the bash command for getting the tail command to work > correctly for a range of files, using the wild card character? > > tail -1 myfiles* > > does NOT work, but I do want the tail to run over the matched files in > myfiles* > > Currently I am using > > ls myfiles* | sed "s/^/tail -1 /" > tmp ; bash tmp ; rm tmp > > but this is cumbersome. > > Thanks for showing a simple answer > > Randall > > >