I have a file
fileinput.txt:
File home/me/fileA.doc is size 232
File home/you/you/fileB.doc is size 343
File /directory/fileC.doc is size 433
File /directory/filed.doc cannot find file size
I want to use the basename command (or any other command) to output:
File fileA.doc is size 232
File fileB.doc is size 343
File fileC.doc is size 433
File filed.doc cannot find file size
I've tried:
/usr/bin/nawk � file=$0
Basename $file � fileinput.txt
But that just prints out the original file! Any suggestions?