You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dm-scripts/removeproofs

15 lines
334 B
Plaintext

11 months ago
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 <input_tex_file>"
exit 1
fi
input_file=$1
output_file="${input_file%.tex}_without_proofs.tex"
awk '/\\begin{proof}/, /\\end{proof}/ {next} 1' "$input_file" > "$output_file"
echo "Lines between \\begin{proof} and \\end{proof} have been removed. Output saved to: $output_file"