with /home/silentm/log/file.machine.log you would need to use echo /home/silentm/log/file.machine.log | cut -d . -f3 echo /home/silentm/log/file.machine.log | cut -d . -f1 *-> /home/silentm/log/file echo /home/silentm/log/file.machine.log | cut -d . -f2 *-> machine echo /home/silentm/log/file.machine.log | cut -d . -f3 *-> log HTH - Jeff >>> geisj at pagestation.com 9/2/2005 9:00 AM >>> I am trying to use cut to tell me the suffix of a file. for example: echo /home/silentm/log/file.machine.log | cut -d . -f 1- I was expecting to get .log or log but I get the entire string echoed back. doing the opposite gave me what I expected: echo /home/silentm/log/file.machine.log | cut -d . -f 1 gives me /home/silentm/log/file I am trying to find a way to test if the file ends in .log? How might I do that. Thanks, Jerry _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos