This document discusses three string operations - realpath, basename, and dirname - that can be performed on file paths in Bash shell scripts. realpath converts a relative path to an absolute path without validating it. basename strips directory information and suffixes from filenames. dirname deletes any suffix beginning with the last slash and returns the directory portion of the path.
This document discusses three string operations - realpath, basename, and dirname - that can be performed on file paths in Bash shell scripts. realpath converts a relative path to an absolute path without validating it. basename strips directory information and suffixes from filenames. dirname deletes any suffix beginning with the last slash and returns the directory portion of the path.
This document discusses three string operations - realpath, basename, and dirname - that can be performed on file paths in Bash shell scripts. realpath converts a relative path to an absolute path without validating it. basename strips directory information and suffixes from filenames. dirname deletes any suffix beginning with the last slash and returns the directory portion of the path.
Learn How to Automate Common Tasks with Bash Shell Scripting
String Operations on Paths realpath : Converts each filename argument to an absolute pathname but it do not validate the path. basename: Strips directory information Strips suffixes from file names dirname : It will delete any suffix beginning with the last slash character and return the result
Learn How to Automate Common Tasks with Bash Shell Scripting