Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sed wildcards instead of grepping for common values #3

Merged
merged 1 commit into from
Mar 25, 2023

Conversation

Pilcrow182
Copy link
Contributor

I noticed that both the main script and the uninstall script were scanning through all specific hard-coded values to try and find the line to modify. While the approach worked, all those grep and sed commands made adding more choices in the future needlessly difficult.

I've modified the script to use sed's single-character wildcard feature in order to simplify things: instead of looking for specific numbers, it now changes the refresh limits from any pair of two-digit numbers to the selected choice.

@ryanrudolfoba ryanrudolfoba merged commit e9af1a4 into ryanrudolfoba:main Mar 25, 2023
@ryanrudolfoba
Copy link
Owner

This is awesome! I was having a hard time figuring things out with sed thats why i used the longer method of grepping. Your solution is perfect thanks so much!

@Pilcrow182 Pilcrow182 deleted the use-wildcards branch March 25, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants