Skip to content

Get current folder

Sometimes, we need to get the current folder, for things like Creating helm charts at work

The problem

Usually we are able to do something like pwd but this returns the entire working directory

Solution

Use basename

basename $(pwd)
Outcome
documentation.breadnet.co.uk

Want to make this site better? Open a PR or help fund hosting costs