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

makes it more humanable #17

Open
cqyisbug opened this issue Nov 1, 2022 · 0 comments
Open

makes it more humanable #17

cqyisbug opened this issue Nov 1, 2022 · 0 comments

Comments

@cqyisbug
Copy link

cqyisbug commented Nov 1, 2022

regex="([0-9A-Z]{32}) = "
[[ $(defaults read $file) =~ $regex ]]
hash=${BASH_REMATCH[1]}
if [ ! -z $hash ]; then
defaults delete $file $hash
fi

regex="([0-9A-Z]{32}) = "
while [[ $(defaults read $file) =~ $regex ]] ; do
    hash=${BASH_REMATCH[1]}
    defaults delete $file $hash
done 
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

No branches or pull requests

1 participant