awk get last field

C++
awk -F "/" '{print $NF}' input	
#Retrieves last field in line delimited with "/"
Source

Also in C++: