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

Add functionality for finding and removing core.* files. #214

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

destogl
Copy link
Member

@destogl destogl commented May 21, 2024

No description provided.

@destogl destogl added the enhancement New feature or request label May 21, 2024
@destogl destogl self-assigned this May 21, 2024
@destogl destogl requested a review from muritane May 21, 2024 08:08
@destogl destogl changed the title Add functionality for finding and removing files. Add functionality for finding and removing core.* files. May 21, 2024

user_decision "Do you want to delete those files?" user_answer
if [[ " ${positive_answers[*]} " =~ " ${user_answer} " ]]; then
find "${search_dir}" -type f -regex ".*core\.[0-9][0-9][0-9][0-9][0-9][0-9]" -delete
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as befor:
find "${search_dir}" -type f -regex ".*core\.[0-9]+"

core files can have more or less then 6 digits. If you want to have with a minimum number min_number then
find "${search_dir}" -type f -regex ".*core\.[0-9]\{min_number,\}"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern with [0-9]\{number\} didn't work for me. Does this work for you? If yes please do a suggestion so I can just add it to PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works both for me if you don't want to supply max then i would prefer the first one. this is more understandable in my opition.

scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
destogl and others added 2 commits June 25, 2024 13:46
Co-authored-by: Manuel Muth <mamueluth@gmail.com>
Co-authored-by: Manuel Muth <mamueluth@gmail.com>
scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
scripts/_Team_Defines.bash Outdated Show resolved Hide resolved
@destogl destogl merged commit ab7ee19 into master Jun 25, 2024
8 checks passed
@destogl destogl deleted the add-fuction-for-removing-core-files branch June 25, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants