Last active
July 3, 2020 09:04
-
-
Save scicco/6429ff20945c054f9aa13785bf15123e to your computer and use it in GitHub Desktop.
print .ruby-version file of all subfolders
This file contains hidden or 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/bash | |
for file in *; | |
do | |
if [ -f "./$file/.ruby-version" ]; then | |
cat "$file/.ruby-version" | sed -e 's/ruby-//g' | tr '\n' ' '; | |
echo "in folder: $file"; | |
fi | |
done; | |
### example: | |
# ./print_ruby_version.sh | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment