Fleeting

A temporary collection of notes

BASH Loops

| Comments

Say have lots of .tex files that you’ve been processing with latexmk and your directory is littered with .aux, .log, etc.. files. Try:

1
for X in *.tex; do latexmk -c $X; done

Say you want to rename a bunch of files from A_slides.tex A_handouts.tex A_slides_withmynotes.tex to filenames all beginning with B:

1
for X in A*; do mv $X B${X##A}; done

Comments