[OS X TeX] [bash] Pdfoutput=0 at the beginning of a file
Peter Dyballa
Peter_Dyballa at Web.DE
Sun Feb 12 19:09:42 EST 2006
Am 13.02.2006 um 00:55 schrieb Alain Matthes:
> Hello
>
> I' m a beginner with bash but i would like to modify a script and a
> file foo.tex.
> I would like to put pdfoutput=0 at the beginning of the file foo.tex.
>
> My first idea is to put pdfoutput=0 in a new file "tempfile"
>
> echo pdfoutput=0 > tempfile then cat tempfile foo.tex > newfoo.tex
>
> Is it correct ? The problem : i need to test the existence of
> tempfile and newfoo.tex.
>
> Perhaps there is a solution to add an a expression at the beginning
> of a file
>
You also could:
echo "pdfoutput=0" > newfoo.tex % this overwrites all contents
cat foo.tex >> newfoo.tex % foo.tex's contents is added
To test if a 'regular' file exists:
if [ -f <FILENAME> ]; then
do this
else
do something else
fi
What do you mean with your last sentence?
--
Greetings
Pete
Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list