Ravi Sir's Cards › AWS
basename without a command?
This interview card answers: basename without a command? Cut up to last slash. Folder part. No subshell, faster.
Read card text
What this card says
What it is
Cut up to last slash.
${p##*/}
Why it matters
Folder part.
${p%/*}
How / example
No subshell, faster.