Skip to content

Instantly share code, notes, and snippets.

@josemiguelo
josemiguelo / gist:c1d7bea711b8ce7181b2f99cff4fd4c1
Last active January 10, 2024 16:14
find and replace all text ocurrences (ripgrep + sed)
rg -uu "oldtext" ./ --files-with-matches | xargs sed -i "s/oldtext/newtext/g"
@josemiguelo
josemiguelo / gist:7a4dd00356837fffc0acbb7b2dfa9e60
Created January 10, 2024 22:05
find duplicated keys within a json file
cat some-file.json | grep '"key"' | sort | uniq -d