Skip to content

Instantly share code, notes, and snippets.

@mkhl
Created February 24, 2016 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkhl/823c530e5b59b80812d7 to your computer and use it in GitHub Desktop.
Save mkhl/823c530e5b59b80812d7 to your computer and use it in GitHub Desktop.
.. # "cd up" by ${1:-1} directories
cd $(seq -f .. -s / 1 ${1:-1})
cd $(jot -b .. -s / ${1:-1})
# using jot(1) is shorter, and doesn't add a trailing /
# but as far as I recall, jot(1) isn't part of GNU userland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment