Mathieu escribió:
I wanted to write an awk script to generate an dep list for a latex file. So I need to match \input{a} and run the same script on a.tex.The question is how to do awk recursively?
Add "a.tex" to the ARGV array, if not already there:
BEGIN { copy ARGV to dep }
/\\input/ {
extract file module name = "somename.tex"
if (!(name in dep)) { add name to ARGV, update ARGC }
}
END {
for (name in dep) { print name }
}
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
