Often while compiling latex files you need to access the most recent .tex, .ps or .pdf file. Sometimes if those file names are long it is often annoying to write them everytime. Here is a set of commands which will work on the last edited/touched file of the specified type.
alias latex. 'latex `ls -t *.tex | head -1` &'
alias emacs. 'emacs `ls -t *.tex | head -1` &'
alias pdf. 'acroread `ls -t *.pdf | head -1` &'
alias acroread. 'acroread `ls -t *.pdf | head -1` &'
alias ps2pdf. 'ps2pdf `ls -t *.ps | head -1` &'
alias lpr.. 'lpr `ls -t *.ps | head -1` &'
alias gv. 'gv `ls -t *.ps | head -1` &'
alias gvl. 'gv --orientation=landscape `ls -t *.ps | head -1` &'
alias lpr. 'lpr `ls -t *.ps | head -1` &'
alias lpdf. 'lpdf `ls -t *.pdf | head -1` &'
Monday, June 28, 2010
Subscribe to:
Post Comments (Atom)
1 comment:
Very useful ! Thanks for the idea & posting it !
Post a Comment