Skip to content

Instantly share code, notes, and snippets.

@brunerd
Last active October 25, 2019 15:15
Show Gist options
  • Save brunerd/bdffaeb2024d9b6190330aaadebbba6e to your computer and use it in GitHub Desktop.
Save brunerd/bdffaeb2024d9b6190330aaadebbba6e to your computer and use it in GitHub Desktop.
Quickly get versions of items in /etc/shells
#!/bin/sh
#brunerd - shell_vers
#a simple version checker of available shells
#not guaranteed to always work (I'm looking at YOU dash!)
#specify another volume to test
target="$1"
#loop through /etc/shells either locally or on specified target volume
for shell in $(grep -v ^\# "${1}"/etc/shells); do
echo "Shell: ${shell}"
"${shell}" --version
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment