[Tuglist] Script for substituting newcommand

Manoj K N tuglist@tug.org.in
Fri, 29 Mar 2002 17:37:45 +0530 (IST)


Hello.

Suppose a style file foo.sty contains a command 
\newcommand{\foo}[1]{Hello #1}

A LaTeX file sample.tex contains the line 
\foo{bar} 

Is there any script (bash/perl) that reads sample.tex and foo.sty and
substitutes it with
Hello bar
?

With regards,
Manoj.

-- 
Manoj K N,
Texas Instruments India Limited, 
Wind Tunnel Road, Bangalore. PIN: 560012.
Karnataka, India.

12 Deg 58 Min N, 77 Deg 39 Min E