Bash get basename of filename or directory name
In Bash, you can use the basename command to get the base name of a file or directory name. The basic syntax is as follows: basename <path> For example, to get the base name of a file called /path/to/myfile.txt, you can use the following command: basename /path/to/myfile.txt This command will return “myfile.txt” You can also … Read more