Get drectory name or file name using shell

Don’t have basename or dirname?

Don’t want to start another process every time you need a path?

Not a problem.

dirname == ${path%/*}

basename == ${path##*/}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

WP Like Button Plugin by Free WordPress Templates