Skip to content

Instantly share code, notes, and snippets.

@Aisuko
Created May 16, 2023 14:26
Show Gist options
  • Save Aisuko/730ae02d5905650da0b1b5ab59e97d82 to your computer and use it in GitHub Desktop.
Save Aisuko/730ae02d5905650da0b1b5ab59e97d82 to your computer and use it in GitHub Desktop.
Shell command for replacing files
@count=$$(find ./go-bert -type f -name "*.c" -exec sh -c "sed 's/ggml_/ggml_bert_/g' {} > {}.tmp && mv {}.tmp {}" \; -print | wc -l); \
echo "Edit *.c file:$$count"
@Aisuko
Copy link
Author

Aisuko commented May 17, 2023

find ./go-bert -type f -name "*.c" -exec sh -c "sed -e 's/ggml_/ggml_bert_/g' {} > {}.tmp && mv {}.tmp {}" \; -print | wc -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment