How to extract filename from the path; i have a list of files. I'm using csh shell, and have awk, sed, perl installed.
/dfgfd/dfgdfg/filename
should give me
filename
I tried basename:
find $PROJDIR -name '*.c' -o -name '*.cc' -o -name '*.h'
| xargs grep -l pattern | xargs basename
and it gave me the following error:
basename: too few arguments Try `basename --help' for more information.
thx