Bart De Schutter's scripts page



This is a collection of bash and perl scripts that could also be useful for other people. Please read the README.txt file for more information and for installation instructions (in particular note that the perl scripts require the installation of some perl library modules).

You can view or download these scripts one by one (but if you use "Save as", make sure to remove any default extension your browser might suggest, like .txt or .htm). You should also make the script executable (use chmod +x name_of_the script).

You can also download all script files at once as a tgz file (install using tar xvfz scripts_2016_07_04.tgz). Extensions and permissions wil automatically be OK then.

The scripts belong to the following categories:

emacs
File Download Last revision Description
eml download 2007-08-01 Runs emacs on the the most recently changed .tex file in the current directory, if it is present; otherwise, the most recently changed file in the current directory is opened with emacs.
epurge download 2002-01-22 Removes all temporary files created by emacs from the directory directory and its subdirectories.
rme download 2002-01-22 Removes all temporary files created by emacs from the current directory.


files
File Download Last revision Description
findgrep download 2007-07-31 Searches all files in the current directory and its subdirectories for a given string.
findgrepsub download 2007-07-31 Searches for string in file. Used as a subroutine in findgrep.
grepdo download 2007-10-19 Performs a grep on the given files and runs the given command on each file that matches the given regular expression regexp.
grepem download 2007-08-06 Performs a grep on the given files and opens those that match the given regular expression regexp.
ll download 2008-09-12 Lists files in long format and pauses after each screen.
mass_add_ext download 2002-01-22 Add the extension ext to the names of the given files.
mass_move download 2007-07-31 Replaces part1 in the names of the given files by part2.
mass_qr download 2002-01-22 Replaces expression expr1 by expr2 in files.
mdiff download 2008-10-21 Performs diff of file1, file2, ... against dir.
mvl download 2007-07-26 Converts filenames from upper case to lower case.
mvnospaces download 2007-07-26 Converts the spaces in the given filenames to underscores.
mvu download 2007-07-26 Converts filenames from lower case to upper case.
revdate download 2007-08-09 Returns the revision dates of the given scripts.


images
File Download Last revision Description
fig2jpg download 2011-01-02 Transforms .fig files into .jpg files using fig2dev and convert.
fig2png download 2011-01-02 Transforms .fig files into .png files using fig2dev and convert.
mk_thumbnails download 2011-01-01 Creates thumbnails for the given files using the convert command.


latex
File Download Last revision Description
adjust_eps_bbox download 2011-09-18 Adjusts the bounding box of eps files (which can be useful to adjust the results of dvi2epspdf or replace_psfrag).
bib_extract download 2009-06-14 Searches the given latex_files for \cite, \citep, \citet, \citeauthor, ..., and \nocite commands and extracts the corresponding bibtex entries.
btl download 2005-02-10 Processes the most recently changed .tex file in the current directory using bibtex.
dl2pdf download 2002-01-22 Transforms the most recently changed .dvi file in the current directory into a .pdf file using dvi2pdf.
dl2ps download 2002-01-22 Transforms the most recently changed .dvi file in the current directory into a .ps file using dvi2ps.
dvi2epspdf download 2015-12-23 Transforms a single-page dvi file into an eps or pdf file with a tight bounding box (useful for figures if you have used psfrag).
dvi2pdf download 2015-12-23 Transforms .dvi files into .pdf files using dvips with the option -Ppdf -G0 and ps2pdf.
dvi2ps download 2012-03-22 Transforms .dvi files into .ps files using dvips.
extract_defs download 2006-05-02 Creates a stand-alone definitions file for given latex file.
figstr2psfrag download 2011-07-31 Extracts text strings from a fig file and returns the corresponding psfrag commands (\psfrag{string}{string}).
gv download 2016-06-30 Shows one or more postscript files using kghostview, gsview, ghostview, or okular.
gvl download 2016-07-04 Shows the most recently changed .ps or .eps file in the current directory.
ltl download 2012-11-18 Processes the most recently changed .tex file in the current directory.
mk_2up download 2011-02-11 Creates 2up pdf files for the given dvi files.
mk_4up download 2011-02-11 Creates 4up pdf files for the given dvi files.
mk_6up download 2011-02-11 Creates 6up pdf files for the given dvi files.
mk_latex_zip download 2011-01-02 Collects all latex, figure, bibtex, ...
mkl download 2008-01-24 Processes the most recently changed .tex file in the current directory by running mktex (i.e, latex, followed by bibtex, followed by latex as many times as necessary to resolve all references).
mktex download 2012-04-12 Processes Latex files that use bibliography files.
mxdvi download 2002-01-22 Runs xdvi on the given .dvi files.
pd download 2016-06-30 Shows one or more pdf file using acroreader, okular, xpdf, epdfview, ghostview, or evince (where the first command of this list that can be found is used).
pdl download 2015-07-20 Shows the most recently changed .pdf file in the current directory using acroreader, okular, xpdf, epdfview, gv, ghostview, or evince (where the first command of this list that can be found is used).
replace_psfrag download 2009-03-14 Extracts the figures from a latex file, processes them, and creates the corresponding stand-alone eps or pdf files for each figure (useful if you have used psfrag).
rmtex download 2015-12-22 Removes all auxiliary files created by latex for the given files.
tcheck download 2011-01-02 Checks LaTeX files for the repetitions of words, for words that occur in the file ~/info/priv/errors.lst, and for words or parts of words that appear in ~/info/priv/danger_full.lst and ~/info/priv/danger_part.lst respectively.
tgrep download 2011-01-02 Searches all .tex files in the directory ~ and its subdirectories for string .
tpurge download 2007-07-31 Removes all auxiliary files created by latex from a directory.
xdl download 2007-07-30 Shows the most recently changed .dvi file in the current directory.


matlab
File Download Last revision Description
mgrep download 2011-01-02 Searches all .m files in the directories ~/matlab for the given string.


pdf
File Download Last revision Description
acro download 2014-06-23 Starts acroread.
dl2pdf download 2002-01-22 Transforms the most recently changed .dvi file in the current directory into a .pdf file using dvi2pdf.
dvi2pdf download 2015-12-23 Transforms .dvi files into .pdf files using dvips with the option -Ppdf -G0 and ps2pdf.
mk_2up download 2011-02-11 Creates 2up pdf files for the given dvi files.
mk_4up download 2011-02-11 Creates 4up pdf files for the given dvi files.
mk_6up download 2011-02-11 Creates 6up pdf files for the given dvi files.
pd download 2016-06-30 Shows one or more pdf file using acroreader, okular, xpdf, epdfview, ghostview, or evince (where the first command of this list that can be found is used).
pdf_compress_gs download 2011-01-10 Use gs to "compress" a pdf file (by replacing hi-resolution images by lower resolution ones).
pdf_concat_gs download 2012-12-30 Use gs to concatenate pdf files.
pdf_extract_pages download 2011-01-11 Use pdftk to extract pages from a pdf file.
pdf_extract_pages_gs download 2011-01-11 Use gs to extract pages from a pdf file.
pdl download 2015-07-20 Shows the most recently changed .pdf file in the current directory using acroreader, okular, xpdf, epdfview, gv, ghostview, or evince (where the first command of this list that can be found is used).


postscript
File Download Last revision Description
adjust_eps_bbox download 2011-09-18 Adjusts the bounding box of eps files (which can be useful to adjust the results of dvi2epspdf or replace_psfrag).
dl2ps download 2002-01-22 Transforms the most recently changed .dvi file in the current directory into a .ps file using dvi2ps.
dvi2ps download 2012-03-22 Transforms .dvi files into .ps files using dvips.
eps2jpg download 2007-09-03 Uses convert to transform an eps or ps file into a jpg file.
eps2png download 2006-11-26 Uses convert to transform an eps or ps file into a png file.
gv download 2016-06-30 Shows one or more postscript files using kghostview, gsview, ghostview, or okular.
gvl download 2016-07-04 Shows the most recently changed .ps or .eps file in the current directory.
ps2up download 2004-01-19 Creates a Postscript file from psfile in which 2 A4 pages are scaled and put on 1 A4 page in landscape mode.
ps4up download 2004-01-19 Creates a Postscript file from psfile in which 4 A4 pages are scaled and put on 1 A4 page in portrait mode.


printing
File Download Last revision Description
a2ps1 download 2014-04-29 Uses a2ps to pretty print an ASCII file with 1 page per page output.
lpl download 2005-02-10 Prints the most recently changed file in the current directory.


xfig
File Download Last revision Description
adjust_fig_lines download 2011-10-09 Adjusts the distance parameter in dashed, dotted, etc.
eps2fig download 2011-12-28 Uses pstoedit to transform an eps, ps, or pdf file into a fig file.
epsl2fig download 2011-09-18 Transforms the most recently changed or created .eps files into a .fig file using eps2fig (i.e., pstoedit).
fig2eps download 2011-01-02 Transforms .fig files into .eps files using fig2dev.
fig2jpg download 2011-01-02 Transforms .fig files into .jpg files using fig2dev and convert.
fig2pdf download 2011-01-02 Transforms .fig files into .pdf files using fig2dev.
fig2png download 2011-01-02 Transforms .fig files into .png files using fig2dev and convert.
fig2ps download 2011-01-02 Transforms .fig files into .ps files using fig2dev.
figl2eps download 2011-01-02 Transforms the n most recently changed .fig files into .eps files using fig2eps.
figl2pdf download 2011-01-02 Transforms the n most recently changed .fig files into .pdf files using fig2pdf.
figl2ps download 2011-01-02 Transforms the n most recently changed .fig files into .ps files using fig2ps.
figstr2psfrag download 2011-07-31 Extracts text strings from a fig file and returns the corresponding psfrag commands (\psfrag{string}{string}).


perl library modules
File Download Last revision Description
Inout.pm download 2012-01-02 Input/output functions.
Note: Include the directory in which these files are saved into your $PERL5LIB environment variable (e.g. include a statement like
export PERL5LIB=${PERL5LIB}:directory_you_saved_these_modules_in
into your .bash_profile file).


This page is maintained by Bart De Schutter. Last update: July 4, 2016.