Skip to content

Instantly share code, notes, and snippets.

@jcpst
Created September 14, 2015 17:48
Show Gist options
  • Save jcpst/e835ad986ef5505a4e40 to your computer and use it in GitHub Desktop.
Save jcpst/e835ad986ef5505a4e40 to your computer and use it in GitHub Desktop.
Bash: directories of a directory in an array
ls -d */ | sed 's/\/*$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment