Find all files with the extension .txt, and for each of them, execute the command to add an @ symbol at the beginning of each line containing the pattern.
find . -type f -name '*.txt' -exec sed -i '' '/pattern/s/^/@/g' {} \;