Unix Command to get file path without basename
Without spawning another process, you can use parameter expansion:
file=/home/files/myfiles/good.txtecho "${file%/*}"/home/files/myfiles
Without spawning another process, you can use parameter expansion:
file=/home/files/myfiles/good.txtecho "${file%/*}"/home/files/myfiles