Last active
October 25, 2019 15:15
-
-
Save brunerd/bdffaeb2024d9b6190330aaadebbba6e to your computer and use it in GitHub Desktop.
Quickly get versions of items in /etc/shells
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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