On Tue, 17 May 2005, Nate Straz wrote: > On Tue, May 17, 2005 at 08:29:59PM -0500, Brock Noland wrote: >> I have a script which needs the extension of a file. The problem I am >> having is how do I get the chars at the end of a filename after the >> LAST period? >> >> brock at brockwork backups $ ls | awk -F. '{ print $2}' > > I think you want '{print $NF}' > > Nate Or if you use zsh for a shell: for a in * ; echo $a:e :-) -- Gerry Skerbitz gsker at comcast.net