Last active
July 30, 2023 13:06
-
-
Save Georgy5/776147af417cb31c82ca96d8277e5c3c to your computer and use it in GitHub Desktop.
Update .ruby-version in several 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
# Change the last 6 in the found -ruby-version files to a 7 | |
# You can change to regular expression to be less specific, this was my use case | |
find ./ -name ".ruby-version" -exec sed -i "s/6$/7/" {} + | |
# Same thing but only go down one level of subfolders | |
find ./ -mindepth 2 -name ".ruby-version" -exec sed -i "s/6$/7/" {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment