What are the ways to get the filename from the absolute path in a variable Mypath=/my/path/file

  1. filename=basename Mypath

  2. filename =file Mypath

  3. filename = ${Mypath#///}

  4. echo $Mypath | awk ‘ FS=”/” { print $4 } ‘


Correct Option: A,C,D

Find more quizzes: