0% found this document useful (0 votes)
15 views3 pages

String Operations On Paths (CMDS: Realpath, Basename and Dirname)

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.

Uploaded by

Gaurav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

String Operations On Paths (CMDS: Realpath, Basename and Dirname)

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.

Uploaded by

Gaurav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

String Operations on Paths

(cmds: realpath, basename and dirname)


NarendraP

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


Thank you

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy