[ create a new paste ] login | about

Link: http://codepad.org/izUMRp01    [ raw code | output | fork ]

C++, pasted on Sep 21:
1
2
3
4
5
6
#include <iostream>

int main(void) {
	for(int i=1; i<29; i++)
		std::cout << "sed -n '/\\maketitle/,/\\end{document}/{//d;p;}' " << "Lecture" << i << ".tex" << " > Lecture" << i << "-body.tex" << std::endl;
} // a.exe > [dir where .tex are]\process.bat


Output:
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture1.tex > Lecture1-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture2.tex > Lecture2-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture3.tex > Lecture3-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture4.tex > Lecture4-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture5.tex > Lecture5-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture6.tex > Lecture6-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture7.tex > Lecture7-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture8.tex > Lecture8-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture9.tex > Lecture9-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture10.tex > Lecture10-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture11.tex > Lecture11-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture12.tex > Lecture12-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture13.tex > Lecture13-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture14.tex > Lecture14-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture15.tex > Lecture15-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture16.tex > Lecture16-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture17.tex > Lecture17-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture18.tex > Lecture18-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture19.tex > Lecture19-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture20.tex > Lecture20-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture21.tex > Lecture21-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture22.tex > Lecture22-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture23.tex > Lecture23-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture24.tex > Lecture24-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture25.tex > Lecture25-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture26.tex > Lecture26-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture27.tex > Lecture27-body.tex
sed -n '/\maketitle/,/\end{document}/{//d;p;}' Lecture28.tex > Lecture28-body.tex


Create a new paste based on this one


Comments: