Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
Source Link
Shixons
  • 393
  • 1
  • 3
  • 4

How to get only filename using sed

How can I get only the filename using sed? I've this

out_file=$(echo $in_file|sed "s/\(.*\.\).*/\1mp4/g")

But I get the path too /root/video.mp4, and I want only video.mp4.