[OS X TeX] Need help with sed command.

Herbert Schulz herbs at wideopenwest.com
Mon Jan 8 22:26:18 CET 2007


On Jan 8, 2007, at 12:10 PM, Norman Gray wrote:

>
> Herbert, hello.
>
> On 2007 Jan 8 , at 01.33, Herbert Schulz wrote:
>
>> I'm trying to build a temporary BIBINPUTS environment variable by  
>> storing the output of
>>
>> kpsewhich --show-path=bib
>
> You do say `don't ask why', but just in case it helps avoid sed  
> hackery, are you aware that an empty path in the relevant  
> environment variable causes the kpse searching algorithms to insert  
> the default path at that point?
>
> Thus
>
> % kpsepath bib
> .:/Volumes/Lagrange/Users/norman/Library/texmf/bibtex/ 
> bib//:<BLAH>:!!/usr/local/teTeX/share/texmf/bibtex///
> % export BIBINPUTS=/my/place::/last/ditch
> % kpsepath bib
> /my/place:.:/Volumes/Lagrange/Users/norman/Library/texmf/bibtex/ 
> bib//<BLAH>:!!/usr/local/teTeX/share/texmf/bibtex///:/last/ditch
>
> Just in case....
>
> Norman
>

Howdy,

Nice to learn about kpsepath! That's what happens when you stop  
reading documentation when you have enough information to do what you  
want. :-(

The reason I needed to use sed is because I had to build a temporary  
BIBINPUTS for an engine file and had to filter out the leading !!'s  
that indicate the directory branch is to be searched via ls-R files.  
This is simply to suppress a minor error message for use by latexmk,  
not by the normal search system. John Collins, the maintainer of  
latexmk is planning on using kpsewhich for the bib file search some  
time in the future; then this won't be necessary.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list