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

Refactor delete #18

Open
jmqm opened this issue Jul 17, 2021 · 1 comment
Open

Refactor delete #18

jmqm opened this issue Jul 17, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jmqm
Copy link
Owner

jmqm commented Jul 17, 2021

In PR #17, it now checks if there are files to delete. I used a variable to hold the contents of the find. Wanting someone to refactor the script a bit so that when deleting files it also uses the variable.

I don't know Linux or sh, I've just been Googling stuff. I tried some ways of doing it but the limited knowledge I've gained isn't enough to solve the problem.

@jmqm jmqm added the help wanted Extra attention is needed label Jul 17, 2021
@jmqm jmqm linked a pull request Jul 18, 2021 that will close this issue
@jmqm jmqm removed a link to a pull request Jul 18, 2021
@jmqm jmqm changed the title Refactor delete script Refactor delete Jan 3, 2022
@jmqm
Copy link
Owner Author

jmqm commented Jan 3, 2022

TO_DELETE=$(find . -iname "*.${EXTENSION}" -type f -mtime +$DELETE_AFTER)
find . -iname "*.${EXTENSION}" -type f -mtime +$DELETE_AFTER -exec rm -f {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant