Closed jacobkahn closed 3 years ago
tl;dr:
echo "* * Copyright" > test.correct.txt
Remove trailing newline:
head -c -1 test.correct.txt > test.correct.2.txt
Replace with some perl:
perl
find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.cuh" -o -name "*.cu" -o -name "*.hpp" \) | xargs perl -i -p0e 's/\*\*\n \* Copyright/`cat test.correct.2.txt`/se'
Before:
After:
tl;dr:
Remove trailing newline:
Replace with some
perl
:Before:
After: