# Rolf Niepraschk, 2002-06-04, niepraschk@ptb.de

# awk -f corr_path.awk -v NEW="/newpath/xxx" filename
#
# $Id: corr_path.awk,v 1.2 2002/06/14 16:49:12 mw Exp $
#
# prints the lines of `filename' with replacements from 
# "/oldpath/xxx" to "/newpath/xxx"

BEGIN{
  fname = a[split(NEW, a, "/")]
}

{ print corr_path(NEW, $0, fname) }

function corr_path(str, target, file, ret)
{
  ret = target; 
  sub("\".*"file"\"","\""str"\"",ret); return ret
}
