basename + file with space

Hi all,

/home/test/test 123.txt
i want exact file name like "test 123.txt"
basename shows wrong output

how can i cut text from 1st charaster to last "/".....?

awk -F\/ '{print $NF}' infile

use nawk or /usr/xpg4/bin/awk in solaris

[house@discovery] echo $( basename "/this/is/a file" )
a file

Needs quotes round the filename.

basename "/home/test/test 123.txt"

test 123.txt

Thank you EAGL� .

IN="/home/test/test 123.txt"
OUT=${IN##*/}