Last active
January 18, 2024 10:32
-
-
Save yuya-maemichi-synspective/51bc4c8af4d737307c169b721e8d308c to your computer and use it in GitHub Desktop.
macOS snippets
This file contains 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
xmlstarlet ed --inplace -u '//module/@type' -v 'EMPTY_MODULE' |
This file contains 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
find ~ \ | |
-path "$HOME/.Trash" -prune -or \ | |
-path "$HOME/Library" -prune -or \ | |
-path '*/node_modules' -prune -or \ | |
-path '*/.idea/*.iml' -type f -print |
This file contains 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
find ~ \ | |
-path "$HOME/.Trash" -prune -or \ | |
-path "$HOME/Google Drive" -prune -or \ | |
-path "$HOME/Library" -prune -or \ | |
-path '*/node_modules' -prune -or \ | |
-path '*/.idea/*.iml' -type f \ | |
-exec xmlstarlet sel -t -m 'module' -v '@type' -o \n '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref. https://xmlstarlet.readthedocs.io/en/latest/usage.html#xmlstarlet-edit