grabbing filename from text file....should be easy!

Quick question...I'm trying to grab the .tif file name from this output from our fax server. What is the best way i can do this in a bash script? I have been looking at regular expressions with bash or using awk but having some trouble. thanks! The only output i want is 'cert375670-20100409-032044.tif'

vsifax@faxer1# vfxstat 1378410
Status for VSI-FAX fax job: 1378410

Submitted by: mfgapp                E-mail      : <none>
Submit time : 04/09 03:24           Queue       : outgoing
Result      : expired               Status      : Max tries reached

To name     : <none>                From name   : Mfgapp User
To company  : Test Company        From company: <none>
To fax #    : 915555555555            From fax #  : <none>
To voice #  : <none>                From voice #: <none>

Subject     : <none>
Num dialed  : 915555555555

File  1     :   1 pg   cert375670-20100409-032044.tif
Total pgs   :   1 pg
vfxstat 1378410 | sed -n '/^File/s/.* \(.*\)/\1/p'
vfxstat 1378410 | grep "tif" | awk '{print $6}'


There's never any need to use grep in this fashion.

vfxstat 1378410 | awk '/tif/ {print $6}'

Personally, I'd go with a simplified version of vgersh99's sed (unnecessary backreference):

sed -n 's/^File.* //p'

Regards,
Alister

vfxstat 1378410 | perl -lne '/^File.* (.*?)$/ && print $1'

tyler_durden

they work great! thank you for your help.