Saturday, 7 July 2018

Linux from the command line | Learning Linux -- The basename command

Linux from the command line | Learning Linux -- The basename command

FTA:
Sometimes, while working on the command line (especially when dealing with shell scripts), you might be interested in only the filename, but what's available to you is the complete path of the file. So, the requirement is to strip the directory component of the path. You'll be glad to know there exists a command - basename - that does this job.
https://www.howtoforge.com/linux-basename-command/

No comments:

Post a Comment